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>
async fn send_single_packet( &self, destination: DestinationHash, data: &[u8], ) -> Result<PacketReceiptDelivered, SendError<SendSinglePacketFailure>>
fn respond_packed(&self, responder: RespondToken, packed: &[u8]) -> bool
fn close_link(&self, link_id: LinkId) -> bool
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