pub struct PrnsNodeHandle<'a, M: RawMutex, const COMMANDS: usize, const N: usize> { /* private fields */ }Implementations§
Source§impl<'a, M: RawMutex, const COMMANDS: usize, const N: usize> PrnsNodeHandle<'a, M, COMMANDS, N>
impl<'a, M: RawMutex, const COMMANDS: usize, const N: usize> PrnsNodeHandle<'a, M, COMMANDS, N>
pub fn new( commands: Sender<'a, M, IssuedCommand, COMMANDS>, pool: &'a CompletionPool<M, N>, ) -> Self
Sourcepub fn issue(&self, command: PrnsCommand) -> Option<CommandId>
pub fn issue(&self, command: PrnsCommand) -> Option<CommandId>
Queues a command without awaiting settlement and returns its ID, or None when the command lane is full.
Sourcepub async fn send_single_packet(
&self,
destination: DestinationHash,
data: &[u8],
) -> Result<PacketReceiptDelivered, SendError<SendSinglePacketFailure>>
pub async fn send_single_packet( &self, destination: DestinationHash, data: &[u8], ) -> Result<PacketReceiptDelivered, SendError<SendSinglePacketFailure>>
Sends one packet and awaits proof, returning Busy when all N completion slots are claimed.
Sourcepub fn respond_packed(&self, responder: RespondToken, packed: &[u8]) -> bool
pub fn respond_packed(&self, responder: RespondToken, packed: &[u8]) -> bool
Responds inline; returns false when the body exceeds the link MDU or the command lane is full.
Sourcepub fn respond_owned_packed(
&self,
responder: RespondToken,
data: RespondData,
) -> bool
pub fn respond_owned_packed( &self, responder: RespondToken, data: RespondData, ) -> bool
Moves a prebuilt response into the command lane, returning false when full.
pub fn respond_static_bytes( &self, responder: RespondToken, data: &'static [u8], ) -> bool
pub fn respond_static_file( &self, responder: RespondToken, name: &'static str, bytes: &'static [u8], ) -> bool
Sourcepub fn close_link(&self, link_id: LinkId) -> bool
pub fn close_link(&self, link_id: LinkId) -> bool
Sever an active link. Returns false if the command lane is full.
Trait Implementations§
Source§impl<M: RawMutex, const COMMANDS: usize, const N: usize> Clone for PrnsNodeHandle<'_, M, COMMANDS, N>
impl<M: RawMutex, const COMMANDS: usize, const N: usize> Clone for PrnsNodeHandle<'_, M, COMMANDS, N>
impl<M: RawMutex, const COMMANDS: usize, const N: usize> Copy for PrnsNodeHandle<'_, M, COMMANDS, N>
Source§impl<M: RawMutex, const COMMANDS: usize, const N: usize> PrnsNodeApi for PrnsNodeHandle<'_, M, COMMANDS, N>
impl<M: RawMutex, const COMMANDS: usize, const N: usize> PrnsNodeApi for PrnsNodeHandle<'_, M, COMMANDS, N>
Source§fn issue(&self, command: PrnsCommand) -> Option<CommandId>
fn issue(&self, command: PrnsCommand) -> Option<CommandId>
Queue an engine command and return the
CommandId it was minted under — watch the event
stream for the settlement tagged with it. None once the node has stopped (or the bounded
embedded lane is full). The fire-and-forget escape hatch.Source§async fn send_single_packet(
&self,
destination: DestinationHash,
data: &[u8],
) -> Result<PacketReceiptDelivered, SendError<SendSinglePacketFailure>>
async fn send_single_packet( &self, destination: DestinationHash, data: &[u8], ) -> Result<PacketReceiptDelivered, SendError<SendSinglePacketFailure>>
Send one Single data packet to
destination and await its delivery proof — Ok(Delivered)
with the measured round trip, or the typed reason it did not deliver.fn respond_packed(&self, responder: RespondToken, packed: &[u8]) -> bool
Source§fn close_link(&self, link_id: LinkId) -> bool
fn close_link(&self, link_id: LinkId) -> bool
Sever an active link. Returns
false once the node has stopped.Source§fn announce(&self, destination: DestinationHash) -> Option<CommandId>
fn announce(&self, destination: DestinationHash) -> Option<CommandId>
Announce
destination on every interface with its registered app_data: RNS 1.4.2
Destination.announce() with no arguments. None once the node has stopped. For one
interface or explicit app_data, issue a custom AnnounceNow.Auto Trait Implementations§
impl<'a, M, const COMMANDS: usize, const N: usize> !RefUnwindSafe for PrnsNodeHandle<'a, M, COMMANDS, N>
impl<'a, M, const COMMANDS: usize, const N: usize> !UnwindSafe for PrnsNodeHandle<'a, M, COMMANDS, N>
impl<'a, M, const COMMANDS: usize, const N: usize> Freeze for PrnsNodeHandle<'a, M, COMMANDS, N>
impl<'a, M, const COMMANDS: usize, const N: usize> Send for PrnsNodeHandle<'a, M, COMMANDS, N>where
M: Sync,
impl<'a, M, const COMMANDS: usize, const N: usize> Sync for PrnsNodeHandle<'a, M, COMMANDS, N>where
M: Sync,
impl<'a, M, const COMMANDS: usize, const N: usize> Unpin for PrnsNodeHandle<'a, M, COMMANDS, N>
impl<'a, M, const COMMANDS: usize, const N: usize> UnsafeUnpin for PrnsNodeHandle<'a, M, COMMANDS, N>
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