Enum libocc::Event[][src]

pub enum Event<'a, T> where
    T: Clone + PartialEq
{ Create(EventContent<'a, T>), Update(EventContent<'a, T>), Delete(EventContent<'a, T>), }

The CRUD operation type

Variants

Create(EventContent<'a, T>)

The operation type of an event creating a new entity

Update(EventContent<'a, T>)

The operation type of an event mutating an existing entity

Delete(EventContent<'a, T>)

The operation type of an event deleting an entity

Implementations

impl<'a, T> Event<'a, T> where
    T: Clone + PartialEq
[src]

pub fn create(data: Cow<'a, T>) -> Self[src]

Constructs a new create event

pub fn update(data: Cow<'a, T>) -> Self[src]

Constructs a new update event

pub fn delete(data: Cow<'a, T>) -> Self[src]

Constructs a new delete event

pub fn get_time(&self) -> &Timestamp[src]

Borrow the date of the event

pub fn take(self) -> Cow<'a, T>[src]

Consumes the event, returning the contained data

Trait Implementations

impl<'a, T: Clone> Clone for Event<'a, T> where
    T: Clone + PartialEq
[src]

impl<'a, T: Debug> Debug for Event<'a, T> where
    T: Clone + PartialEq
[src]

impl<'a, T> Deref for Event<'a, T> where
    T: Clone + PartialEq
[src]

type Target = T

The resulting type after dereferencing.

impl<'de, 'a, T> Deserialize<'de> for Event<'a, T> where
    T: Clone + PartialEq,
    T: Deserialize<'de>, 
[src]

impl<'a, T: PartialEq> PartialEq<Event<'a, T>> for Event<'a, T> where
    T: Clone + PartialEq
[src]

impl<'a, T> PartialOrd<Event<'a, T>> for Event<'a, T> where
    T: Clone + PartialEq
[src]

impl<'a, T> Serialize for Event<'a, T> where
    T: Clone + PartialEq,
    T: Serialize
[src]

impl<'a, T> StructuralPartialEq for Event<'a, T> where
    T: Clone + PartialEq
[src]

Auto Trait Implementations

impl<'a, T> RefUnwindSafe for Event<'a, T> where
    T: RefUnwindSafe

impl<'a, T> Send for Event<'a, T> where
    T: Send + Sync

impl<'a, T> Sync for Event<'a, T> where
    T: Sync

impl<'a, T> Unpin for Event<'a, T> where
    T: Unpin

impl<'a, T> UnwindSafe for Event<'a, T> where
    T: RefUnwindSafe + UnwindSafe

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<T> From<T> for T[src]

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

impl<T> Same<T> for T

type Output = T

Should always be Self

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.