pub struct Hooks {
pub log_fn: Arc<dyn Fn(CommunicationSetup) -> Option<Logger<CapacityContainerBuilder<Vec<(Duration, CommunicationEvent)>>>> + Send + Sync>,
pub refill: BytesRefill,
pub spill: Option<Arc<dyn Fn() -> (Box<dyn SpillPolicy>, Box<dyn SpillPolicy>) + Send + Sync>>,
}Expand description
Configuration hooks that (currently) live outside the configuration.
Fields are public so callers can mutate Hooks::default() before
passing it to try_build_with.
Fields§
§log_fn: Arc<dyn Fn(CommunicationSetup) -> Option<Logger<CapacityContainerBuilder<Vec<(Duration, CommunicationEvent)>>>> + Send + Sync>A mechanism to set up loggers for each communication thread.
refill: BytesRefillA strategy for refreshing bytes for BytesSlab.
spill: Option<Arc<dyn Fn() -> (Box<dyn SpillPolicy>, Box<dyn SpillPolicy>) + Send + Sync>>A mechanism to get a matched pair of spill policies (writer, reader) per queue.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Hooks
impl !RefUnwindSafe for Hooks
impl Send for Hooks
impl Sync for Hooks
impl Unpin for Hooks
impl UnsafeUnpin for Hooks
impl !UnwindSafe for Hooks
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more