pub struct EmbassyInterfaceSeam<'a, M: RawMutex, const NOTIFY: usize, const FRAME: usize> { /* private fields */ }Implementations§
Source§impl<'a, M: RawMutex, const NOTIFY: usize, const FRAME: usize> EmbassyInterfaceSeam<'a, M, NOTIFY, FRAME>
impl<'a, M: RawMutex, const NOTIFY: usize, const FRAME: usize> EmbassyInterfaceSeam<'a, M, NOTIFY, FRAME>
pub fn new( id: InterfaceId, inbound: EmbassyGrantProducer<'a, M, FRAME>, notify: Sender<'a, M, InterfaceId, NOTIFY>, outbound: EmbassyGrantConsumer<'a, M, FRAME>, fill_entropy: fn(&mut [u8]), ) -> Self
Trait Implementations§
Source§impl<M: RawMutex, const NOTIFY: usize, const FRAME: usize> InterfaceSeam for EmbassyInterfaceSeam<'_, M, NOTIFY, FRAME>
impl<M: RawMutex, const NOTIFY: usize, const FRAME: usize> InterfaceSeam for EmbassyInterfaceSeam<'_, M, NOTIFY, FRAME>
fn fill_entropy(&mut self, bytes: &mut [u8])
Source§async fn inbound_sink(&mut self) -> &mut dyn FrameSink
async fn inbound_sink(&mut self) -> &mut dyn FrameSink
The storage the frame being received accumulates in — the seam’s granted inbound slot, so a streaming deframer’s writes land once, already across the seam. Parks until a slot is free (backpressure: an interface that cannot grant stops reading its medium). Repeated calls before
commit_inbound return the same storage with its accumulation intact, so one frame may arrive across many reads.Source§async fn commit_inbound(&mut self)
async fn commit_inbound(&mut self)
Hand the manifold the frame accumulated in
inbound_sink and release the storage. An empty sink commits nothing — delimiter-only keepalives die here, in one place, for every interface.async fn next_inbound_with_phy( &mut self, frame: &[u8], packet_phy: PacketPhyStats, )
async fn next_outbound(&mut self) -> &[u8] ⓘ
Source§fn accept_outbound_custody(&mut self)
fn accept_outbound_custody(&mut self)
Accept responsibility for a frame copied into the interface’s own
bounded pending storage, allowing the seam-owned slot to be reused.
This is not completion;
complete_outbound
still reports the eventual disposition.fn complete_outbound(&mut self, _disposition: OutboundDisposition)
fn interface_origin(&self) -> InterfaceOriginKind
Source§async fn next_inbound(&mut self, frame: &[u8])
async fn next_inbound(&mut self, frame: &[u8])
Hand the manifold one whole frame heard on the medium — the datagram path, derived from the sink pair. A frame past the sink’s capacity is dropped whole.
Source§fn try_next_outbound(&mut self) -> Option<&[u8]>
fn try_next_outbound(&mut self) -> Option<&[u8]>
A further frame already committed for this interface, if one is waiting. Never parks; the borrow contract matches
next_outbound. Serve loops use it to coalesce a burst that queued behind the frame being written into one wire write; the default never offers one, so a seam without it simply never batches.async fn request_tunnel_synthesis(&mut self)
Auto Trait Implementations§
impl<'a, M, const NOTIFY: usize, const FRAME: usize> !RefUnwindSafe for EmbassyInterfaceSeam<'a, M, NOTIFY, FRAME>
impl<'a, M, const NOTIFY: usize, const FRAME: usize> !UnwindSafe for EmbassyInterfaceSeam<'a, M, NOTIFY, FRAME>
impl<'a, M, const NOTIFY: usize, const FRAME: usize> Freeze for EmbassyInterfaceSeam<'a, M, NOTIFY, FRAME>
impl<'a, M, const NOTIFY: usize, const FRAME: usize> Send for EmbassyInterfaceSeam<'a, M, NOTIFY, FRAME>where
M: Sync,
impl<'a, M, const NOTIFY: usize, const FRAME: usize> Sync for EmbassyInterfaceSeam<'a, M, NOTIFY, FRAME>where
M: Sync,
impl<'a, M, const NOTIFY: usize, const FRAME: usize> Unpin for EmbassyInterfaceSeam<'a, M, NOTIFY, FRAME>
impl<'a, M, const NOTIFY: usize, const FRAME: usize> UnsafeUnpin for EmbassyInterfaceSeam<'a, M, NOTIFY, FRAME>
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