Struct de_net::connection::delivery::ReceiveHandlerGuard
source · pub(crate) struct ReceiveHandlerGuard<'a> {
guard: MutexGuard<'a, ConnectionBook<ConnDeliveryHandler>>,
}
Expand description
The lock is unlocked once this guard is dropped.
Fields§
§guard: MutexGuard<'a, ConnectionBook<ConnDeliveryHandler>>
Implementations§
source§impl<'a> ReceiveHandlerGuard<'a>
impl<'a> ReceiveHandlerGuard<'a>
sourcepub(crate) fn received<'buf>(
&mut self,
addr: SocketAddr,
record: DeliveryRecord,
data: Vec<u8>,
buf: &'buf mut [u8]
) -> Result<Deliveries<'_, 'buf>, ReceivedIdError>
pub(crate) fn received<'buf>( &mut self, addr: SocketAddr, record: DeliveryRecord, data: Vec<u8>, buf: &'buf mut [u8] ) -> Result<Deliveries<'_, 'buf>, ReceivedIdError>
Validate input package and return an iterator of to be delivered packages on success.
All reliable sent packages are not to be delivered to the user directly but via the returned iterator.
§Panics
Panics if this is called with a non-reliable package.
Auto Trait Implementations§
impl<'a> Freeze for ReceiveHandlerGuard<'a>
impl<'a> !RefUnwindSafe for ReceiveHandlerGuard<'a>
impl<'a> Send for ReceiveHandlerGuard<'a>
impl<'a> Sync for ReceiveHandlerGuard<'a>
impl<'a> Unpin for ReceiveHandlerGuard<'a>
impl<'a> !UnwindSafe for ReceiveHandlerGuard<'a>
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