pub struct NoConfiguredMessages;
riot_module_core_msg
and crate feature with_msg_v2
only.Implementations§
Source§impl NoConfiguredMessages
The MessageSemantics of a thread that has made no previous commitment to receive any
messages.
impl NoConfiguredMessages
The MessageSemantics of a thread that has made no previous commitment to receive any messages.
Sourcepub(crate) unsafe fn new() -> Self
pub(crate) unsafe fn new() -> Self
Create a new MessageSemantics object to split into ReceivePorts.
Conditions, violating which is a safety violation:
-
The thread must currently not allow sending any messages to it, or even created an otherwise unused NoConfiguredMessages
-
The thread must not terminate.
TBD: Add a version of the thread spawner that comes with all kinds of once-per-thread gadgets.
Trait Implementations§
Source§impl MessageSemantics for NoConfiguredMessages
impl MessageSemantics for NoConfiguredMessages
Source§unsafe fn drop(_message: &mut ReceivedMessage<'_, Self>)
unsafe fn drop(_message: &mut ReceivedMessage<'_, Self>)
Panicking because if a thread receives unknown messages, it may for the same reason receive mistyped messages, and that’d be a safety violation that’s better shown in the most visible way.
If this is undesired, think twice about whether the source of the message really can’t happen to send messages of a number this threads expects (and handles as something different) as well. If it is still undesired, you can core::mem::forget() the message after having decoded all desired types.
fn typeno_is_known(&self, _typeno: u16) -> bool
Source§fn split_off<NewType: Send, const NEW_TYPENO: u16>(
self,
) -> (Processing<Self, NewType, NEW_TYPENO>, ReceivePort<NewType, NEW_TYPENO>, SendPort<NewType, NEW_TYPENO>)
fn split_off<NewType: Send, const NEW_TYPENO: u16>( self, ) -> (Processing<Self, NewType, NEW_TYPENO>, ReceivePort<NewType, NEW_TYPENO>, SendPort<NewType, NEW_TYPENO>)
Source§fn receive(&self) -> ReceivedMessage<'_, Self>
fn receive(&self) -> ReceivedMessage<'_, Self>
Source§fn try_receive(&self) -> Option<ReceivedMessage<'_, Self>>
fn try_receive(&self) -> Option<ReceivedMessage<'_, Self>>
Auto Trait Implementations§
impl Freeze for NoConfiguredMessages
impl RefUnwindSafe for NoConfiguredMessages
impl Send for NoConfiguredMessages
impl Sync for NoConfiguredMessages
impl Unpin for NoConfiguredMessages
impl UnwindSafe for NoConfiguredMessages
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
Source§impl<T> IntoSwitch for T
impl<T> IntoSwitch for T
Source§fn into_switch<ActiveLevel>(self) -> Switch<T, ActiveLevel>
fn into_switch<ActiveLevel>(self) -> Switch<T, ActiveLevel>
Source§fn into_active_high_switch(self) -> Switch<Self, ActiveHigh>where
Self: Sized,
fn into_active_high_switch(self) -> Switch<Self, ActiveHigh>where
Self: Sized,
Layout§
Note: Most layout information is completely unstable and may even differ between compilations. The only exception is types with certain repr(...)
attributes. Please see the Rust Reference's “Type Layout” chapter for details on type layout guarantees.
Size: 0 bytes