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,
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,
pub fn new<'d, D>(
recipe: PrnsNodeRecipe<D, St, R, F, ManuallyAttached, S>,
wiring: ManifoldWiring<M, LANE_COUNT, NOTIFY, COMMANDS, LIFECYCLE, COMPLETIONS>,
host: H,
) -> Selfwhere
D: IntoIterator<Item = PreConfiguredDestination<'d>>,
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,
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,
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 Selfwhere
D: IntoIterator<Item = PreConfiguredDestination<'d>>,
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)where
D: IntoIterator<Item = PreConfiguredDestination<'d>>,
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>,
) -> Selfwhere
D: IntoIterator<Item = PreConfiguredDestination<'d>>,
pub fn set_protocol_policy(&mut self, policy: EngineProtocolPolicy)
pub fn handle(&self) -> PrnsNodeHandle<'static, M, COMMANDS, COMPLETIONS>
Sourcepub async fn run(self, drive: impl Future<Output = ()>)
pub async fn run(self, drive: impl Future<Output = ()>)
Runs the manifold with the caller’s interface and supervisor tasks.
Sourcepub async fn run_with_proof_decider<P>(
self,
should_prove: P,
drive: impl Future<Output = ()>,
)
pub async fn run_with_proof_decider<P>( self, should_prove: P, drive: impl Future<Output = ()>, )
Runs the node with the synchronous application decision used by destinations
configured with ProofStrategy::ProveIf.
The closure lives in this future and is consulted inline after delivery is journaled. Prns allocates no policy table or per-packet decision state; capture a shared handle to application state when proof policy must change at runtime.
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,
pub async fn run_with_interface_store_and_proof_decider<P, 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>, should_prove: P, drive: impl Future<Output = ()>, )
Sourcepub async fn run_manifold(&mut self)
pub async fn run_manifold(&mut self)
Runs only the manifold for boards that schedule interfaces separately.
Sourcepub async fn run_manifold_with_proof_decider<P>(&mut self, should_prove: P)
pub async fn run_manifold_with_proof_decider<P>(&mut self, should_prove: P)
Runs only the manifold with a synchronous application proof decision.
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,
pub async fn run_manifold_with_interface_store_and_proof_decider<P, 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>, should_prove: P, )
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>,
)where
M: Sync,
Fl: NorFlash,
Keys: RouteSnapshotKeys,
Observe: FnMut(EmbeddedPersistenceDiagnostic),
pub async fn run_manifold_with_persistence_and_interface_store_and_proof_decider<Fl, Keys, Observe, Decide, 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>,
should_prove: Decide,
)where
M: Sync,
Fl: NorFlash,
Keys: RouteSnapshotKeys,
Observe: FnMut(EmbeddedPersistenceDiagnostic),
Decide: FnMut(&ProofRequest<'_>) -> bool,
pub async fn restore_embedded_persistence<Fl, Keys, Observe, const PENDING: usize>(
&mut self,
persistence: &mut EmbeddedFlashPersistence<Fl, Keys, Observe, PENDING>,
) -> EmbeddedPersistenceRestoreReportwhere
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
AssembledNode<St, R, F, S>: Freeze,
Vec<(InterfaceId, &'static mut dyn ManifoldLaneReader), LANE_COUNT>: Freeze,
PooledEgress<LANE_COUNT>: Freeze,
Receiver<'static, M, InterfaceId, NOTIFY>: Freeze,
Receiver<'static, M, IssuedCommand, COMMANDS>: Freeze,
Receiver<'static, M, InterfaceLifecycle, LIFECYCLE>: Freeze,
PrnsNodeHandle<'static, M, COMMANDS, COMPLETIONS>: Freeze,
H: Freeze,
Vec<InterfaceDescriptor, INTERFACE_CAPACITY>: Freeze,
Vec<InterfaceIfac, LANE_COUNT>: 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
AssembledNode<St, R, F, S>: Send,
Vec<(InterfaceId, &'static mut dyn ManifoldLaneReader), LANE_COUNT>: Send,
PooledEgress<LANE_COUNT>: Send,
Receiver<'static, M, InterfaceId, NOTIFY>: Send,
Receiver<'static, M, IssuedCommand, COMMANDS>: Send,
Receiver<'static, M, InterfaceLifecycle, LIFECYCLE>: Send,
PrnsNodeHandle<'static, M, COMMANDS, COMPLETIONS>: Send,
H: Send,
Vec<InterfaceDescriptor, INTERFACE_CAPACITY>: Send,
Vec<InterfaceIfac, LANE_COUNT>: Send,
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
AssembledNode<St, R, F, S>: Unpin,
Vec<(InterfaceId, &'static mut dyn ManifoldLaneReader), LANE_COUNT>: Unpin,
PooledEgress<LANE_COUNT>: Unpin,
Receiver<'static, M, InterfaceId, NOTIFY>: Unpin,
Receiver<'static, M, IssuedCommand, COMMANDS>: Unpin,
Receiver<'static, M, InterfaceLifecycle, LIFECYCLE>: Unpin,
PrnsNodeHandle<'static, M, COMMANDS, COMPLETIONS>: Unpin,
H: Unpin,
Vec<InterfaceDescriptor, INTERFACE_CAPACITY>: Unpin,
Vec<InterfaceIfac, LANE_COUNT>: 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
AssembledNode<St, R, F, S>: UnsafeUnpin,
Vec<(InterfaceId, &'static mut dyn ManifoldLaneReader), LANE_COUNT>: UnsafeUnpin,
PooledEgress<LANE_COUNT>: UnsafeUnpin,
Receiver<'static, M, InterfaceId, NOTIFY>: UnsafeUnpin,
Receiver<'static, M, IssuedCommand, COMMANDS>: UnsafeUnpin,
Receiver<'static, M, InterfaceLifecycle, LIFECYCLE>: UnsafeUnpin,
PrnsNodeHandle<'static, M, COMMANDS, COMPLETIONS>: UnsafeUnpin,
H: UnsafeUnpin,
Vec<InterfaceDescriptor, INTERFACE_CAPACITY>: UnsafeUnpin,
Vec<InterfaceIfac, LANE_COUNT>: UnsafeUnpin,
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