pub struct SyncBoxProcessor(/* private fields */);Expand description
Thread-safe wrapper for BoxProcessor.
BoxProcessor (BoxCloneService) is Send but not Sync because the
inner Box<dyn CloneServiceInner> lacks a Sync bound. This wrapper
stores the processor behind Arc<Mutex<...>>, providing safe Send+Sync
access. The Mutex is only held briefly during clone() — each caller
gets an independent BoxProcessor copy.
Implementations§
Source§impl SyncBoxProcessor
impl SyncBoxProcessor
pub fn new(processor: BoxProcessor) -> Self
pub fn clone_inner(&self) -> BoxProcessor
Trait Implementations§
Auto Trait Implementations§
impl Freeze for SyncBoxProcessor
impl RefUnwindSafe for SyncBoxProcessor
impl Send for SyncBoxProcessor
impl Sync for SyncBoxProcessor
impl Unpin for SyncBoxProcessor
impl UnsafeUnpin for SyncBoxProcessor
impl UnwindSafe 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