pub struct Hooks {
pub log_fn: Arc<dyn Fn(CommunicationSetup) -> Option<Logger<CommunicationEventBuilder>> + Send + Sync>,
pub refill: BytesRefill,
pub spill: Option<SpillPolicyFn>,
}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<CommunicationEventBuilder>> + Send + Sync>A mechanism to set up loggers for each communication thread.
refill: BytesRefillA strategy for refreshing bytes for BytesSlab.
spill: Option<SpillPolicyFn>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