Struct Cell
pub struct Cell<T>(/* private fields */)
where
    T: 'static + MeshField + Send + Sync + Clone;Expand description
A cell containing a value that can be updated from a remote node.
Created by cell().
Implementations§
§impl<T> Cell<T>
 
impl<T> Cell<T>
pub 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).
pub fn with_mut<F, R>(&self, f: F) -> R
pub fn with_mut<F, R>(&self, f: F) -> R
Runs f with a mutable 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).
pub async fn wait_next(&mut self)
pub async fn wait_next(&mut self)
Waits for a new value to be set.
Trait Implementations§
§impl<T> DefaultEncoding for Cell<T>
 
impl<T> DefaultEncoding for Cell<T>
§type Encoding = TableEncoder
 
type Encoding = TableEncoder
The encoding to use for the serialization. Read more
§impl<'encoding, T> StructDecodeMetadata<'encoding, Resource> for Cell<T>
 
impl<'encoding, T> StructDecodeMetadata<'encoding, Resource> for Cell<T>
§const DECODERS: &'static [ErasedDecoderEntry]
 
const DECODERS: &'static [ErasedDecoderEntry]
The list of decoder vtables.
§impl<T> StructEncodeMetadata<Resource> for Cell<T>
 
impl<T> StructEncodeMetadata<Resource> for Cell<T>
§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,
§impl<T> Instrument for T
 
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
 
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
 
fn in_current_span(self) -> Instrumented<Self>
§impl<T> SerializeMessage for Twhere
    T: 'static + MeshPayload + Send,
 
impl<T> SerializeMessage for Twhere
    T: 'static + MeshPayload + Send,
§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.§fn write_message(self, writer: MessageWriter<'_, '_, Resource>)
 
fn write_message(self, writer: MessageWriter<'_, '_, Resource>)
Writes the message, as in 
MessageEncode::write_message.§fn extract(self) -> <T as SerializeMessage>::Concrete
 
fn extract(self) -> <T as SerializeMessage>::Concrete
Extract the concrete message.