[][src]Struct butane_core::ObjectState

pub struct ObjectState {
    pub saved: bool,
}

Used internally by butane to track state about the object.

Includes information such as whether it has actually been created in the database yet. Butane automatically creates the field state: ObjectState on #[model] structs. When initializing the state field, use ObjectState::default().

Fields

saved: bool

Trait Implementations

impl Clone for ObjectState[src]

impl Debug for ObjectState[src]

impl Default for ObjectState[src]

impl Eq for ObjectState[src]

impl PartialEq<ObjectState> for ObjectState[src]

Two ObjectStates always compare as equal. This effectively removes ObjectState from participating in equality tests between two objects

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

impl<T, U> Into<U> for T where
    U: From<T>, 
[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.