pub struct SimFace { /* private fields */ }Expand description
A simulated face implementing the Face trait.
Created in pairs by SimLink::pair. Internally
backed by Tokio MPSC channels with link-property emulation applied in the
send path.
Trait Implementations§
Source§impl Face for SimFace
impl Face for SimFace
fn id(&self) -> FaceId
fn kind(&self) -> FaceKind
Source§fn remote_uri(&self) -> Option<String>
fn remote_uri(&self) -> Option<String>
Remote URI (e.g.
udp4://192.168.1.1:6363). Returns None for face
types that don’t have a meaningful remote endpoint.Source§async fn recv(&self) -> Result<Bytes, FaceError>
async fn recv(&self) -> Result<Bytes, FaceError>
Receive the next packet. Blocks until a packet arrives or the face closes.
Source§async fn send(&self, pkt: Bytes) -> Result<(), FaceError>
async fn send(&self, pkt: Bytes) -> Result<(), FaceError>
Send a packet. Must not block the caller; use internal buffering. Read more
Source§fn local_uri(&self) -> Option<String>
fn local_uri(&self) -> Option<String>
Local URI (e.g.
unix:///run/nfd/nfd.sock). Returns None for face
types that don’t expose local binding info.Auto Trait Implementations§
impl !Freeze for SimFace
impl !RefUnwindSafe for SimFace
impl Send for SimFace
impl Sync for SimFace
impl Unpin for SimFace
impl UnwindSafe for SimFace
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