pub struct Cell<T: 'static + MeshField + Send + Sync + Clone>(/* private fields */);
Expand description
A cell containing a value that can be updated from a remote node.
Created by cell()
.
Implementations§
Source§impl<T: 'static + MeshField + Send + Sync + Clone> Cell<T>
impl<T: 'static + MeshField + Send + Sync + Clone> Cell<T>
Sourcepub fn with<F, R>(&self, f: F) -> R
pub fn with<F, R>(&self, f: F) -> R
Runs f
with a reference to the cell’s current value.
While f
is running, updates to the cell’s value will not be
acknowledged (and the remote updater’s set
method will block).
Trait Implementations§
Source§impl<T> DefaultEncoding for Cell<T>
impl<T> DefaultEncoding for Cell<T>
Source§type Encoding = TableEncoder
type Encoding = TableEncoder
The encoding to use for the serialization. Read more
Source§impl<'encoding, T> StructDecodeMetadata<'encoding, Resource> for Cell<T>
impl<'encoding, T> StructDecodeMetadata<'encoding, Resource> for Cell<T>
Source§const DECODERS: &'static [ErasedDecoderEntry] = _
const DECODERS: &'static [ErasedDecoderEntry] = _
The list of decoder vtables.
Source§impl<T> StructEncodeMetadata<Resource> for Cell<T>
impl<T> StructEncodeMetadata<Resource> for Cell<T>
Source§const ENCODERS: &'static [ErasedEncoderEntry] = _
const ENCODERS: &'static [ErasedEncoderEntry] = _
The list of encoder vtables.
Auto Trait Implementations§
impl<T> Freeze for Cell<T>where
T: Freeze,
impl<T> !RefUnwindSafe for Cell<T>
impl<T> Send for Cell<T>
impl<T> Sync for Cell<T>
impl<T> Unpin for Cell<T>where
T: Unpin,
impl<T> !UnwindSafe for Cell<T>
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> SerializeMessage for Twhere
T: 'static + MeshPayload + Send,
impl<T> SerializeMessage for Twhere
T: 'static + MeshPayload + Send,
Source§fn compute_message_size(&mut self, sizer: MessageSizer<'_>)
fn compute_message_size(&mut self, sizer: MessageSizer<'_>)
Computes the message size, as in
MessageEncode::compute_message_size
.Source§fn write_message(self, writer: MessageWriter<'_, '_, Resource>)
fn write_message(self, writer: MessageWriter<'_, '_, Resource>)
Writes the message, as in
MessageEncode::write_message
.Source§fn extract(self) -> <T as SerializeMessage>::Concrete
fn extract(self) -> <T as SerializeMessage>::Concrete
Extract the concrete message.