Struct minimq::publication::DeferredPublication
source · pub struct DeferredPublication<E, F: FnOnce(&mut [u8]) -> Result<usize, E>> { /* private fields */ }
Expand description
A publication where the payload is serialized directly into the transmission buffer in the future.
Note
This is “deferred” because the closure will only be called once the publication is actually sent.
Implementations§
source§impl<E, F: FnOnce(&mut [u8]) -> Result<usize, E>> DeferredPublication<E, F>
impl<E, F: FnOnce(&mut [u8]) -> Result<usize, E>> DeferredPublication<E, F>
pub fn new<'a>(func: F) -> Publication<'a, Self>
Trait Implementations§
Auto Trait Implementations§
impl<E, F> RefUnwindSafe for DeferredPublication<E, F>where
F: RefUnwindSafe,
impl<E, F> Send for DeferredPublication<E, F>where
F: Send,
impl<E, F> Sync for DeferredPublication<E, F>where
F: Sync,
impl<E, F> Unpin for DeferredPublication<E, F>where
F: Unpin,
impl<E, F> UnwindSafe for DeferredPublication<E, F>where
F: UnwindSafe,
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