pub struct SyncBoxProcessor(/* private fields */);Expand description
Shareable wrapper for BoxProcessor.
BoxProcessor (BoxCloneSyncService) is Send + Sync, so this wrapper
needs no mutex: it holds the processor directly and clone_inner() is a
lock-free virtual clone_box() call, giving each caller an independent
BoxProcessor copy.
Vestigial wrapper: with the Send + Sync erased type the newtype adds no
safety anymore. Collapsing it into a plain BoxProcessor alias is a
separate follow-up, not this change.
Implementations§
Source§impl SyncBoxProcessor
impl SyncBoxProcessor
pub fn new(processor: BoxProcessor) -> Self
pub fn clone_inner(&self) -> BoxProcessor
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for SyncBoxProcessor
impl !UnwindSafe for SyncBoxProcessor
impl Freeze for SyncBoxProcessor
impl Send for SyncBoxProcessor
impl Sync for SyncBoxProcessor
impl Unpin for SyncBoxProcessor
impl UnsafeUnpin for SyncBoxProcessor
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