Skip to main content

EmbassyInterfaceSeam

Struct EmbassyInterfaceSeam 

Source
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>

Source

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>

Source§

fn fill_entropy(&mut self, bytes: &mut [u8])

Source§

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)

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.
Source§

async fn next_inbound_with_phy( &mut self, frame: &[u8], packet_phy: PacketPhyStats, )

Source§

async fn next_outbound(&mut self) -> &[u8]

Source§

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.
Source§

fn complete_outbound(&mut self, _disposition: OutboundDisposition)

Source§

fn interface_origin(&self) -> InterfaceOriginKind

Source§

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]>

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.
Source§

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> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.