Skip to main content

PrnsNode

Struct PrnsNode 

Source
pub struct PrnsNode<St, R, F, S, H, M, const LANE_COUNT: usize, const INTERFACE_CAPACITY: usize, const NOTIFY: usize, const COMMANDS: usize, const LIFECYCLE: usize, const COMPLETIONS: usize, const ROUTED_REQUESTS: usize = 4, const ROUTED_REQUEST_BYTES: usize = MAX_SEND_REQUEST_DATA_LEN>
where S: StorageLayout, M: RawMutex + 'static,
{ /* private fields */ }

Implementations§

Source§

impl<St, R, F, S, H, M, const LANE_COUNT: usize, const INTERFACE_CAPACITY: usize, const NOTIFY: usize, const COMMANDS: usize, const LIFECYCLE: usize, const COMPLETIONS: usize> PrnsNode<St, R, F, S, H, M, LANE_COUNT, INTERFACE_CAPACITY, NOTIFY, COMMANDS, LIFECYCLE, COMPLETIONS, 4, MAX_SEND_REQUEST_DATA_LEN>
where R: RequestEndpointSet<St>, F: FnMut(PrnsEvent<'_>, &St), S: StorageLayout, H: Host, M: RawMutex + 'static,

Source

pub fn new<'d, D>( recipe: PrnsNodeRecipe<D, St, R, F, ManuallyAttached, S>, wiring: ManifoldWiring<M, LANE_COUNT, NOTIFY, COMMANDS, LIFECYCLE, COMPLETIONS>, host: H, ) -> Self

Source§

impl<St, R, F, S, H, M, const LANE_COUNT: usize, const INTERFACE_CAPACITY: usize, const NOTIFY: usize, const COMMANDS: usize, const LIFECYCLE: usize, const COMPLETIONS: usize, const ROUTED_REQUESTS: usize, const ROUTED_REQUEST_BYTES: usize> PrnsNode<St, R, F, S, H, M, LANE_COUNT, INTERFACE_CAPACITY, NOTIFY, COMMANDS, LIFECYCLE, COMPLETIONS, ROUTED_REQUESTS, ROUTED_REQUEST_BYTES>
where R: RequestEndpointSet<St>, F: FnMut(PrnsEvent<'_>, &St), S: StorageLayout, H: Host, M: RawMutex + 'static,

Source

pub fn init_static<'d, D>( cell: &'static StaticCell<Self>, recipe: PrnsNodeRecipe<D, St, R, F, ManuallyAttached, S>, wiring: ManifoldWiring<M, LANE_COUNT, NOTIFY, COMMANDS, LIFECYCLE, COMPLETIONS>, host: H, ) -> &'static mut Self

Source

pub fn init_static_with_persistence<'d, D, P>( cell: &'static StaticCell<Self>, recipe: PrnsNodeRecipe<D, St, R, F, ManuallyAttached, S, P>, wiring: ManifoldWiring<M, LANE_COUNT, NOTIFY, COMMANDS, LIFECYCLE, COMPLETIONS>, host: H, ) -> (&'static mut Self, P)

Source

pub fn new_with_request_capacity<'d, D>( recipe: PrnsNodeRecipe<D, St, R, F, ManuallyAttached, S>, wiring: ManifoldWiring<M, LANE_COUNT, NOTIFY, COMMANDS, LIFECYCLE, COMPLETIONS>, host: H, _capacity: RequestRoutingCapacity<ROUTED_REQUESTS, ROUTED_REQUEST_BYTES>, ) -> Self

Source

pub fn set_protocol_policy(&mut self, policy: EngineProtocolPolicy)

Source

pub fn handle(&self) -> PrnsNodeHandle<'static, M, COMMANDS, COMPLETIONS>

Source

pub async fn run(self, drive: impl Future<Output = ()>)

Runs the manifold with the caller’s interface and supervisor tasks.

Source

pub async fn run_with_interface_store<const INTERFACES: usize, const PACKET_PHY_CAPACITY: usize, const PACKET_PHY_INDEX_BUCKETS: usize>( self, store: &EmbassyInterfaceStore<M, INTERFACES, PACKET_PHY_CAPACITY, PACKET_PHY_INDEX_BUCKETS>, drive: impl Future<Output = ()>, )
where M: Sync,

Source

pub async fn run_manifold(&mut self)

Runs only the manifold for boards that schedule interfaces separately.

Source

pub async fn run_manifold_with_interface_store<const INTERFACES: usize, const PACKET_PHY_CAPACITY: usize, const PACKET_PHY_INDEX_BUCKETS: usize>( &mut self, store: &EmbassyInterfaceStore<M, INTERFACES, PACKET_PHY_CAPACITY, PACKET_PHY_INDEX_BUCKETS>, )
where M: Sync,

Source

pub async fn run_manifold_with_persistence_and_interface_store<Fl, Keys, Observe, const PENDING: usize, const INTERFACES: usize, const PACKET_PHY_CAPACITY: usize, const PACKET_PHY_INDEX_BUCKETS: usize>( &mut self, store: &EmbassyInterfaceStore<M, INTERFACES, PACKET_PHY_CAPACITY, PACKET_PHY_INDEX_BUCKETS>, persistence: &mut EmbeddedFlashPersistence<Fl, Keys, Observe, PENDING>, )

Source

pub async fn restore_embedded_persistence<Fl, Keys, Observe, const PENDING: usize>( &mut self, persistence: &mut EmbeddedFlashPersistence<Fl, Keys, Observe, PENDING>, ) -> EmbeddedPersistenceRestoreReport
where Fl: NorFlash, Keys: RouteSnapshotKeys, Observe: FnMut(EmbeddedPersistenceDiagnostic), H: ResumableHost,

Auto Trait Implementations§

§

impl<St, R, F, S, H, M, const LANE_COUNT: usize, const INTERFACE_CAPACITY: usize, const NOTIFY: usize, const COMMANDS: usize, const LIFECYCLE: usize, const COMPLETIONS: usize, const ROUTED_REQUESTS: usize = 4, const ROUTED_REQUEST_BYTES: usize = MAX_SEND_REQUEST_DATA_LEN> !RefUnwindSafe for PrnsNode<St, R, F, S, H, M, LANE_COUNT, INTERFACE_CAPACITY, NOTIFY, COMMANDS, LIFECYCLE, COMPLETIONS, ROUTED_REQUESTS, ROUTED_REQUEST_BYTES>

§

impl<St, R, F, S, H, M, const LANE_COUNT: usize, const INTERFACE_CAPACITY: usize, const NOTIFY: usize, const COMMANDS: usize, const LIFECYCLE: usize, const COMPLETIONS: usize, const ROUTED_REQUESTS: usize = 4, const ROUTED_REQUEST_BYTES: usize = MAX_SEND_REQUEST_DATA_LEN> !Sync for PrnsNode<St, R, F, S, H, M, LANE_COUNT, INTERFACE_CAPACITY, NOTIFY, COMMANDS, LIFECYCLE, COMPLETIONS, ROUTED_REQUESTS, ROUTED_REQUEST_BYTES>

§

impl<St, R, F, S, H, M, const LANE_COUNT: usize, const INTERFACE_CAPACITY: usize, const NOTIFY: usize, const COMMANDS: usize, const LIFECYCLE: usize, const COMPLETIONS: usize, const ROUTED_REQUESTS: usize = 4, const ROUTED_REQUEST_BYTES: usize = MAX_SEND_REQUEST_DATA_LEN> !UnwindSafe for PrnsNode<St, R, F, S, H, M, LANE_COUNT, INTERFACE_CAPACITY, NOTIFY, COMMANDS, LIFECYCLE, COMPLETIONS, ROUTED_REQUESTS, ROUTED_REQUEST_BYTES>

§

impl<St, R, F, S, H, M, const LANE_COUNT: usize, const INTERFACE_CAPACITY: usize, const NOTIFY: usize, const COMMANDS: usize, const LIFECYCLE: usize, const COMPLETIONS: usize, const ROUTED_REQUESTS: usize, const ROUTED_REQUEST_BYTES: usize> Freeze for PrnsNode<St, R, F, S, H, M, LANE_COUNT, INTERFACE_CAPACITY, NOTIFY, COMMANDS, LIFECYCLE, COMPLETIONS, ROUTED_REQUESTS, ROUTED_REQUEST_BYTES>
where H: Freeze, St: Freeze, F: Freeze, <S as StorageLayout>::ScheduledAnnounces: Freeze, <S as StorageLayout>::PacketHashes: Freeze, <S as StorageLayout>::Channels: Freeze, <S as StorageLayout>::DirtyInterfaces: Freeze, <S as StorageLayout>::Routes: Freeze, <S as StorageLayout>::RouteExpiries: Freeze, <S as StorageLayout>::Announces: Freeze, <S as StorageLayout>::History: Freeze, <S as StorageLayout>::AppData: Freeze, <S as StorageLayout>::DestinationIdentities: Freeze, <S as StorageLayout>::DestinationIdentityAppData: Freeze, <S as StorageLayout>::UpstreamAppDestinations: Freeze, <S as StorageLayout>::Blackholes: Freeze, <S as StorageLayout>::HeldIdentities: Freeze, <S as StorageLayout>::SelfRatchets: Freeze, <S as StorageLayout>::Receipts: Freeze, <S as StorageLayout>::ReverseRoutes: Freeze, <S as StorageLayout>::PendingPathRequests: Freeze, <S as StorageLayout>::RecentPathRequests: Freeze, <S as StorageLayout>::SeenPathRequests: Freeze, <S as StorageLayout>::Tunnels: Freeze, <S as StorageLayout>::RecursivePathRequests: Freeze, <S as StorageLayout>::InterfacePathRequestLimits: Freeze, <S as StorageLayout>::InterfaceAnnounceLimits: Freeze, <S as StorageLayout>::HeldAnnounces: Freeze, <S as StorageLayout>::HeldAnnounceAppData: Freeze, <S as StorageLayout>::DestinationAnnounceLimits: Freeze, <S as StorageLayout>::GroupKeys: Freeze, <S as StorageLayout>::RequestHandlers: Freeze, <S as StorageLayout>::TransportedLinks: Freeze, <S as StorageLayout>::Links: Freeze, <S as StorageLayout>::OutgoingResources: Freeze, <S as StorageLayout>::IncomingResources: Freeze, <S as StorageLayout>::IncomingAssemblies: Freeze, <S as StorageLayout>::OutgoingAssemblies: Freeze, <S as StorageLayout>::DepartedInterfaces: Freeze,

§

impl<St, R, F, S, H, M, const LANE_COUNT: usize, const INTERFACE_CAPACITY: usize, const NOTIFY: usize, const COMMANDS: usize, const LIFECYCLE: usize, const COMPLETIONS: usize, const ROUTED_REQUESTS: usize, const ROUTED_REQUEST_BYTES: usize> Send for PrnsNode<St, R, F, S, H, M, LANE_COUNT, INTERFACE_CAPACITY, NOTIFY, COMMANDS, LIFECYCLE, COMPLETIONS, ROUTED_REQUESTS, ROUTED_REQUEST_BYTES>
where H: Send, St: Send, F: Send, <S as StorageLayout>::ScheduledAnnounces: Send, <S as StorageLayout>::PacketHashes: Send, <S as StorageLayout>::Channels: Send, <S as StorageLayout>::DirtyInterfaces: Send, R: Send, <S as StorageLayout>::Routes: Send, <S as StorageLayout>::RouteExpiries: Send, <S as StorageLayout>::Announces: Send, <S as StorageLayout>::History: Send, <S as StorageLayout>::AppData: Send, <S as StorageLayout>::DestinationIdentities: Send, <S as StorageLayout>::DestinationIdentityAppData: Send, <S as StorageLayout>::UpstreamAppDestinations: Send, <S as StorageLayout>::Blackholes: Send, <S as StorageLayout>::HeldIdentities: Send, <S as StorageLayout>::SelfRatchets: Send, <S as StorageLayout>::Receipts: Send, <S as StorageLayout>::ReverseRoutes: Send, <S as StorageLayout>::PendingPathRequests: Send, <S as StorageLayout>::RecentPathRequests: Send, <S as StorageLayout>::SeenPathRequests: Send, <S as StorageLayout>::Tunnels: Send, <S as StorageLayout>::RecursivePathRequests: Send, <S as StorageLayout>::InterfacePathRequestLimits: Send, <S as StorageLayout>::InterfaceAnnounceLimits: Send, <S as StorageLayout>::HeldAnnounces: Send, <S as StorageLayout>::HeldAnnounceAppData: Send, <S as StorageLayout>::DestinationAnnounceLimits: Send, <S as StorageLayout>::GroupKeys: Send, <S as StorageLayout>::RequestHandlers: Send, <S as StorageLayout>::TransportedLinks: Send, <S as StorageLayout>::Links: Send, <S as StorageLayout>::OutgoingResources: Send, <S as StorageLayout>::IncomingResources: Send, <S as StorageLayout>::IncomingAssemblies: Send, <S as StorageLayout>::OutgoingAssemblies: Send, <S as StorageLayout>::DepartedInterfaces: Send, M: Sync,

§

impl<St, R, F, S, H, M, const LANE_COUNT: usize, const INTERFACE_CAPACITY: usize, const NOTIFY: usize, const COMMANDS: usize, const LIFECYCLE: usize, const COMPLETIONS: usize, const ROUTED_REQUESTS: usize, const ROUTED_REQUEST_BYTES: usize> Unpin for PrnsNode<St, R, F, S, H, M, LANE_COUNT, INTERFACE_CAPACITY, NOTIFY, COMMANDS, LIFECYCLE, COMPLETIONS, ROUTED_REQUESTS, ROUTED_REQUEST_BYTES>
where H: Unpin, St: Unpin, F: Unpin, <S as StorageLayout>::ScheduledAnnounces: Unpin, <S as StorageLayout>::PacketHashes: Unpin, <S as StorageLayout>::Channels: Unpin, <S as StorageLayout>::DirtyInterfaces: Unpin, R: Unpin, <S as StorageLayout>::Routes: Unpin, <S as StorageLayout>::RouteExpiries: Unpin, <S as StorageLayout>::Announces: Unpin, <S as StorageLayout>::History: Unpin, <S as StorageLayout>::AppData: Unpin, <S as StorageLayout>::DestinationIdentities: Unpin, <S as StorageLayout>::DestinationIdentityAppData: Unpin, <S as StorageLayout>::UpstreamAppDestinations: Unpin, <S as StorageLayout>::Blackholes: Unpin, <S as StorageLayout>::HeldIdentities: Unpin, <S as StorageLayout>::SelfRatchets: Unpin, <S as StorageLayout>::Receipts: Unpin, <S as StorageLayout>::ReverseRoutes: Unpin, <S as StorageLayout>::PendingPathRequests: Unpin, <S as StorageLayout>::RecentPathRequests: Unpin, <S as StorageLayout>::SeenPathRequests: Unpin, <S as StorageLayout>::Tunnels: Unpin, <S as StorageLayout>::RecursivePathRequests: Unpin, <S as StorageLayout>::InterfacePathRequestLimits: Unpin, <S as StorageLayout>::InterfaceAnnounceLimits: Unpin, <S as StorageLayout>::HeldAnnounces: Unpin, <S as StorageLayout>::HeldAnnounceAppData: Unpin, <S as StorageLayout>::DestinationAnnounceLimits: Unpin, <S as StorageLayout>::GroupKeys: Unpin, <S as StorageLayout>::RequestHandlers: Unpin, <S as StorageLayout>::TransportedLinks: Unpin, <S as StorageLayout>::Links: Unpin, <S as StorageLayout>::OutgoingResources: Unpin, <S as StorageLayout>::IncomingResources: Unpin, <S as StorageLayout>::IncomingAssemblies: Unpin, <S as StorageLayout>::OutgoingAssemblies: Unpin, <S as StorageLayout>::DepartedInterfaces: Unpin,

§

impl<St, R, F, S, H, M, const LANE_COUNT: usize, const INTERFACE_CAPACITY: usize, const NOTIFY: usize, const COMMANDS: usize, const LIFECYCLE: usize, const COMPLETIONS: usize, const ROUTED_REQUESTS: usize, const ROUTED_REQUEST_BYTES: usize> UnsafeUnpin for PrnsNode<St, R, F, S, H, M, LANE_COUNT, INTERFACE_CAPACITY, NOTIFY, COMMANDS, LIFECYCLE, COMPLETIONS, ROUTED_REQUESTS, ROUTED_REQUEST_BYTES>
where H: UnsafeUnpin, St: UnsafeUnpin, F: UnsafeUnpin, <S as StorageLayout>::ScheduledAnnounces: UnsafeUnpin, <S as StorageLayout>::PacketHashes: UnsafeUnpin, <S as StorageLayout>::Channels: UnsafeUnpin, <S as StorageLayout>::DirtyInterfaces: UnsafeUnpin, <S as StorageLayout>::Routes: UnsafeUnpin, <S as StorageLayout>::RouteExpiries: UnsafeUnpin, <S as StorageLayout>::Announces: UnsafeUnpin, <S as StorageLayout>::History: UnsafeUnpin, <S as StorageLayout>::AppData: UnsafeUnpin, <S as StorageLayout>::DestinationIdentities: UnsafeUnpin, <S as StorageLayout>::DestinationIdentityAppData: UnsafeUnpin, <S as StorageLayout>::UpstreamAppDestinations: UnsafeUnpin, <S as StorageLayout>::Blackholes: UnsafeUnpin, <S as StorageLayout>::HeldIdentities: UnsafeUnpin, <S as StorageLayout>::SelfRatchets: UnsafeUnpin, <S as StorageLayout>::Receipts: UnsafeUnpin, <S as StorageLayout>::ReverseRoutes: UnsafeUnpin, <S as StorageLayout>::PendingPathRequests: UnsafeUnpin, <S as StorageLayout>::RecentPathRequests: UnsafeUnpin, <S as StorageLayout>::SeenPathRequests: UnsafeUnpin, <S as StorageLayout>::Tunnels: UnsafeUnpin, <S as StorageLayout>::RecursivePathRequests: UnsafeUnpin, <S as StorageLayout>::InterfacePathRequestLimits: UnsafeUnpin, <S as StorageLayout>::InterfaceAnnounceLimits: UnsafeUnpin, <S as StorageLayout>::HeldAnnounces: UnsafeUnpin, <S as StorageLayout>::HeldAnnounceAppData: UnsafeUnpin, <S as StorageLayout>::DestinationAnnounceLimits: UnsafeUnpin, <S as StorageLayout>::GroupKeys: UnsafeUnpin, <S as StorageLayout>::RequestHandlers: UnsafeUnpin, <S as StorageLayout>::TransportedLinks: UnsafeUnpin, <S as StorageLayout>::Links: UnsafeUnpin, <S as StorageLayout>::OutgoingResources: UnsafeUnpin, <S as StorageLayout>::IncomingResources: UnsafeUnpin, <S as StorageLayout>::IncomingAssemblies: UnsafeUnpin, <S as StorageLayout>::OutgoingAssemblies: UnsafeUnpin, <S as StorageLayout>::DepartedInterfaces: UnsafeUnpin,

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> 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, 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.