Struct elfo_core::Local [−][src]
pub struct Local<T>(_);Expand description
Used to send values that cannot be serialized. Works inside the current node only.
Messages must be instances of Clone, Serialize and Deserialize because
of network communication and message dumping. However, in some cases, it’s
desired to have messages that cannot satisfy requirements.
For instance, when sending channels.
Local<T> implements Debug, Serialize and Deserialize for any T.
Meanwhile, it can be serialized (but w/o useful information), it cannot be
deserialized (it returns an error on attempts).
Example
#[message]
pub struct OpenDirectChannel {
pub tx: Local<mpsc::Sender>,
}Implementations
Trait Implementations
Auto Trait Implementations
impl<T> RefUnwindSafe for Local<T> where
T: RefUnwindSafe,
impl<T> UnwindSafe for Local<T> where
T: UnwindSafe,
Blanket Implementations
Mutably borrows from an owned value. Read more
The equivalent of Access::load.
Attaches the provided Subscriber to this type, returning a
WithDispatch wrapper. Read more
Attaches the current default Subscriber to this type, returning a
WithDispatch wrapper. Read more
