[][src]Trait futures_signals_structs_traits::MutableStruct

pub trait MutableStruct {
    type SnapshotType;
    fn snapshot(&self) -> Self::SnapshotType;
fn update(&self, new_snapshot: Self::SnapshotType); }

Associated Types

Loading content...

Required methods

fn snapshot(&self) -> Self::SnapshotType

Returns a non-mutable version of this struct, which is a basic Rust struct that can be passed around to code that is not aware of futures-signals.

Note that 'non-mutable' in this context does not mean immutable in the Rust sense. It just means that the struct is not a MutableStruct and therefore changes are not tracked by futures-signals.

fn update(&self, new_snapshot: Self::SnapshotType)

Updates every field in this MutableStruct to match an non-mutable struct.

Loading content...

Implementations on Foreign Types

impl<T: Clone> MutableStruct for MutableVec<T>[src]

type SnapshotType = Vec<T>

Loading content...

Implementors

Loading content...