pub trait Path: Send + Debug {
// Required methods
fn carrier(&self) -> Carrier;
fn relay_device(&self) -> Option<String>;
fn prepare(
&mut self,
subject: &str,
plain: &[u8],
) -> Result<Packet, OpenError>;
fn transmit(&mut self, packet: &Packet) -> Result<(), OpenError>;
fn receipt(
&mut self,
counter: u64,
bound: Option<Deadline>,
) -> Result<bool, OpenError>;
// Provided methods
fn interrupt_handle(&self) -> Option<Stop> { ... }
fn life(&self) -> Option<LinkLife> { ... }
fn refuse_unsolicited(&self) -> Result<(), OpenError> { ... }
fn direct_index(&self) -> Option<u32> { ... }
}Expand description
A keyed carrier answers one crossing or one message deadline.
Required Methods§
fn carrier(&self) -> Carrier
fn relay_device(&self) -> Option<String>
Sourcefn prepare(&mut self, subject: &str, plain: &[u8]) -> Result<Packet, OpenError>
fn prepare(&mut self, subject: &str, plain: &[u8]) -> Result<Packet, OpenError>
§Errors
Invalid input, oversized message, or exhausted Noise nonce.
Provided Methods§
fn interrupt_handle(&self) -> Option<Stop>
fn life(&self) -> Option<LinkLife>
Sourcefn refuse_unsolicited(&self) -> Result<(), OpenError>
fn refuse_unsolicited(&self) -> Result<(), OpenError>
§Errors
Unsolicited traffic or an observed carrier end.
Sourcefn direct_index(&self) -> Option<u32>
fn direct_index(&self) -> Option<u32>
The device’s local direct index; streams have none.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".