Trait deltastruct::DeltaStruct[][src]

pub trait DeltaStruct<T> {
    fn apply(&mut self, delta: &T);
}

A trait derived for each tagged struct where T is it's generated delta.

#[deltastruct]
mod Foo {
  struct Foo {
    bar : bool
  }
  impl Foo {
    fn foobar(&mut self) {}
  }
}

will generate:

impl DeltaStruct<FooDelta> for Foo {
  fn apply(&mut self, delta : &FooDelta) {
    /* ... */
  }
}

Required methods

fn apply(&mut self, delta: &T)[src]

Loading content...

Implementations on Foreign Types

impl DeltaStruct<i8Delta> for i8[src]

impl DeltaStruct<i16Delta> for i16[src]

impl DeltaStruct<i32Delta> for i32[src]

impl DeltaStruct<i64Delta> for i64[src]

impl DeltaStruct<u8Delta> for u8[src]

impl DeltaStruct<u16Delta> for u16[src]

impl DeltaStruct<u32Delta> for u32[src]

impl DeltaStruct<u64Delta> for u64[src]

impl DeltaStruct<usizeDelta> for usize[src]

impl DeltaStruct<isizeDelta> for isize[src]

impl DeltaStruct<f32Delta> for f32[src]

impl DeltaStruct<f64Delta> for f64[src]

impl DeltaStruct<boolDelta> for bool[src]

impl DeltaStruct<charDelta> for char[src]

impl DeltaStruct<StringDelta> for String[src]

impl<T> DeltaStruct<VecDelta<T>> for Vec<T> where
    T: Clone
[src]

impl<T> DeltaStruct<OptionDelta<T>> for Option<T> where
    T: Clone
[src]

impl<T> DeltaStruct<HashSetDelta<T>> for HashSet<T> where
    T: Clone + Eq + Hash
[src]

impl<T, U> DeltaStruct<HashMapDelta<T, U>> for HashMap<T, U> where
    T: Clone + Eq + Hash,
    U: Clone
[src]

Loading content...

Implementors

Loading content...