Enum libocc::Event [−][src]
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]
T: Clone + PartialEq,
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]
T: Clone + PartialEq,
impl<'a, T: Debug> Debug for Event<'a, T> where
T: Clone + PartialEq,
[src]
T: Clone + PartialEq,
impl<'a, T> Deref for Event<'a, T> where
T: Clone + PartialEq,
[src]
T: Clone + PartialEq,
impl<'de, 'a, T> Deserialize<'de> for Event<'a, T> where
T: Clone + PartialEq,
T: Deserialize<'de>,
[src]
T: Clone + PartialEq,
T: Deserialize<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
[src]
__D: Deserializer<'de>,
impl<'a, T: PartialEq> PartialEq<Event<'a, T>> for Event<'a, T> where
T: Clone + PartialEq,
[src]
T: Clone + PartialEq,
impl<'a, T> PartialOrd<Event<'a, T>> for Event<'a, T> where
T: Clone + PartialEq,
[src]
T: Clone + PartialEq,
fn partial_cmp(&self, other: &Self) -> Option<Ordering>
[src]
#[must_use]pub fn lt(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]pub fn le(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]pub fn gt(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]pub fn ge(&self, other: &Rhs) -> bool
1.0.0[src]
impl<'a, T> Serialize for Event<'a, T> where
T: Clone + PartialEq,
T: Serialize,
[src]
T: Clone + PartialEq,
T: Serialize,
fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error> where
__S: Serializer,
[src]
__S: Serializer,
impl<'a, T> StructuralPartialEq for Event<'a, T> where
T: Clone + PartialEq,
[src]
T: Clone + PartialEq,
Auto Trait Implementations
impl<'a, T> RefUnwindSafe for Event<'a, T> where
T: RefUnwindSafe,
T: RefUnwindSafe,
impl<'a, T> Send for Event<'a, T> where
T: Send + Sync,
T: Send + Sync,
impl<'a, T> Sync for Event<'a, T> where
T: Sync,
T: Sync,
impl<'a, T> Unpin for Event<'a, T> where
T: Unpin,
T: Unpin,
impl<'a, T> UnwindSafe for Event<'a, T> where
T: RefUnwindSafe + UnwindSafe,
T: RefUnwindSafe + UnwindSafe,
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> DeserializeOwned for T where
T: for<'de> Deserialize<'de>,
[src]
T: for<'de> Deserialize<'de>,
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> Same<T> for T
type Output = T
Should always be Self
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,