Skip to main content

PrnsNodeHandle

Struct PrnsNodeHandle 

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

Source

pub fn new( commands: Sender<'a, M, IssuedCommand, COMMANDS>, pool: &'a CompletionPool<M, N>, ) -> Self

Source

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.

Source

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.

Source

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.

Source

pub fn respond_owned_packed( &self, responder: RespondToken, data: RespondData, ) -> bool

Moves a prebuilt response into the command lane, returning false when full.

Source

pub fn respond_static_bytes( &self, responder: RespondToken, data: &'static [u8], ) -> bool

Source

pub fn respond_static_file( &self, responder: RespondToken, name: &'static str, bytes: &'static [u8], ) -> 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>

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

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>

Source§

fn issue(&self, command: PrnsCommand) -> Option<CommandId>

Queues an engine command and returns the CommandId it was minted under. If you’re looking for its settlement, watch the event stream for the settlement tagged with that CommandId. Read more
Source§

async fn send_single_packet( &self, destination: DestinationHash, data: &[u8], ) -> Result<PacketReceiptDelivered, SendError<SendSinglePacketFailure>>

Source§

fn respond_packed(&self, responder: RespondToken, packed: &[u8]) -> bool

Source§

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. Read more

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> 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> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. 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> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
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.