[][src]Struct nature_common::Instance

pub struct Instance {
    pub id: u128,
    pub data: BizObject,
    pub create_time: i64,
}

A snapshot for a particular Meta

Fields

id: u128

A unique value used to distinguish other instance

data: BizObjectcreate_time: i64

When this instance created in db

Implementations

impl Instance[src]

pub fn new(key: &str) -> Result<Self>[src]

pub fn revise(&mut self) -> Result<&mut Self>[src]

pub fn meta_must_same(is: &Vec<Self>) -> Result<()>[src]

pub async fn get_master<'a, F, ID, '_, '_>(
    &'_ self,
    self_meta: &'_ Meta,
    dao: ID
) -> Result<Option<Instance>> where
    F: Future<Output = Result<Option<Instance>>>,
    ID: Fn(KeyCondition) -> F, 
[src]

pub fn get_key(&self) -> String[src]

pub fn key_no_state(&self) -> String[src]

Methods from Deref<Target = BizObject>

pub fn modify_state(&mut self, add_and_delete: &TargetState, meta: &Meta)[src]

Trait Implementations

impl Clone for Instance[src]

impl Debug for Instance[src]

impl Default for Instance[src]

impl Deref for Instance[src]

type Target = BizObject

The resulting type after dereferencing.

impl DerefMut for Instance[src]

impl<'de> Deserialize<'de> for Instance[src]

impl Eq for Instance[src]

impl<'_> From<&'_ Instance> for KeyCondition[src]

impl<'_> From<&'_ Instance> for FromInstance[src]

impl Into<KeyCondition> for Instance[src]

impl Iterator for Instance[src]

type Item = Instance

The type of the elements being iterated over.

impl PartialEq<Instance> for Instance[src]

impl Serialize for Instance[src]

impl StructuralEq for Instance[src]

impl StructuralPartialEq for Instance[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> DeserializeOwned for T where
    T: for<'de> Deserialize<'de>, 
[src]

impl<Q, K> Equivalent<K> for Q where
    K: Borrow<Q> + ?Sized,
    Q: Eq + ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<I> IntoIterator for I where
    I: Iterator
[src]

type Item = <I as Iterator>::Item

The type of the elements being iterated over.

type IntoIter = I

Which kind of iterator are we turning this into?

impl<I> IteratorRandom for I where
    I: Iterator
[src]

impl<T> Itertools for T where
    T: Iterator + ?Sized
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,