Struct elfo::Local [−][src]
pub struct Local<T>(_);
Expand description
Messages must be instances of Serialize
and Deserialize
because of
network communication and message dumping. However, in some cases, it’s
desired to have messages that cannot be serialized. For instance, when
sharding TCP sockets.
Local<T>
implements 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).
Implementations
Trait Implementations
pub fn deserialize<D>(
_deserializer: D
) -> Result<Local<T>, <D as Deserializer<'de>>::Error> where
D: Deserializer<'de>,
pub fn deserialize<D>(
_deserializer: D
) -> Result<Local<T>, <D as Deserializer<'de>>::Error> where
D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
pub fn serialize<S>(
&self,
serializer: S
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error> where
S: Serializer,
pub fn serialize<S>(
&self,
serializer: S
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error> where
S: Serializer,
Serialize this value into the given Serde serializer. Read more
Auto Trait Implementations
impl<T> RefUnwindSafe for Local<T> where
T: RefUnwindSafe,
impl<T> UnwindSafe for Local<T> where
T: UnwindSafe,
Blanket Implementations
impl<T, A, P> Access<T> for P where
A: Access<T>,
P: Deref<Target = A>,
impl<T, A, P> Access<T> for P where
A: Access<T>,
P: Deref<Target = A>,
Mutably borrows from an owned value. Read more
pub fn load(&self) -> DynGuard<T>
pub fn load(&self) -> DynGuard<T>
The equivalent of [Access::load
].
Compare self to key
and return true
if they are equal.
Instruments this type with the provided Span
, returning an
Instrumented
wrapper. Read more
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