Struct openpgp_ca_lib::db::models::Cert[][src]

pub struct Cert {
    pub id: i32,
    pub fingerprint: String,
    pub pub_cert: String,
    pub user_id: Option<i32>,
    pub delisted: bool,
    pub inactive: bool,
}

Fields

id: i32fingerprint: Stringpub_cert: Stringuser_id: Option<i32>delisted: boolinactive: bool

Trait Implementations

impl<'update> AsChangeset for &'update Cert[src]

type Target = table

The table which Self::Changeset will be updating

type Changeset = <(Eq<fingerprint, &'update String>, Eq<pub_cert, &'update String>, Option<Eq<user_id, &'update i32>>, Eq<delisted, &'update bool>, Eq<inactive, &'update bool>) as AsChangeset>::Changeset

The update statement this type represents

fn as_changeset(self) -> Self::Changeset[src]

Convert self into the actual update statement being executed

impl<'update> AsChangeset for Cert[src]

type Target = table

The table which Self::Changeset will be updating

type Changeset = <(Eq<fingerprint, String>, Eq<pub_cert, String>, Option<Eq<user_id, i32>>, Eq<delisted, bool>, Eq<inactive, bool>) as AsChangeset>::Changeset

The update statement this type represents

fn as_changeset(self) -> Self::Changeset[src]

Convert self into the actual update statement being executed

impl<__FK> BelongsTo<Cert> for CertEmail where
    __FK: Hash + Eq,
    &'__a i32: Into<Option<&'__a __FK>>,
    &'__a Cert: Identifiable<Id = &'__a __FK>, 
[src]

type ForeignKey = __FK

The foreign key of this struct

type ForeignKeyColumn = cert_id

The database column representing the foreign key of the table this struct represents Read more

fn foreign_key(&self) -> Option<&Self::ForeignKey>[src]

Returns the foreign key for self

fn foreign_key_column() -> Self::ForeignKeyColumn[src]

Returns the foreign key column of this struct’s table

impl<__FK> BelongsTo<Cert> for Revocation where
    __FK: Hash + Eq,
    &'__a i32: Into<Option<&'__a __FK>>,
    &'__a Cert: Identifiable<Id = &'__a __FK>, 
[src]

type ForeignKey = __FK

The foreign key of this struct

type ForeignKeyColumn = cert_id

The database column representing the foreign key of the table this struct represents Read more

fn foreign_key(&self) -> Option<&Self::ForeignKey>[src]

Returns the foreign key for self

fn foreign_key_column() -> Self::ForeignKeyColumn[src]

Returns the foreign key column of this struct’s table

impl BelongsTo<User> for Cert[src]

type ForeignKey = i32

The foreign key of this struct

type ForeignKeyColumn = user_id

The database column representing the foreign key of the table this struct represents Read more

fn foreign_key(&self) -> Option<&Self::ForeignKey>[src]

Returns the foreign key for self

fn foreign_key_column() -> Self::ForeignKeyColumn[src]

Returns the foreign key column of this struct’s table

impl Clone for Cert[src]

fn clone(&self) -> Cert[src]

Returns a copy of the value. Read more

fn clone_from(&mut self, source: &Self)1.0.0[src]

Performs copy-assignment from source. Read more

impl Debug for Cert[src]

fn fmt(&self, f: &mut Formatter<'_>) -> Result[src]

Formats the value using the given formatter. Read more

impl HasTable for Cert[src]

type Table = table

The table this type is associated with.

fn table() -> Self::Table[src]

Returns the table this type is associated with.

impl Hash for Cert[src]

fn hash<__H: Hasher>(&self, state: &mut __H)[src]

Feeds this value into the given Hasher. Read more

fn hash_slice<H>(data: &[Self], state: &mut H) where
    H: Hasher
1.3.0[src]

Feeds a slice of this type into the given Hasher. Read more

impl<'ident> Identifiable for &'ident Cert[src]

type Id = &'ident i32

The type of this struct’s identifier. Read more

fn id(self) -> Self::Id[src]

Returns the identifier for this record. Read more

impl PartialEq<Cert> for Cert[src]

fn eq(&self, other: &Cert) -> bool[src]

This method tests for self and other values to be equal, and is used by ==. Read more

fn ne(&self, other: &Cert) -> bool[src]

This method tests for !=.

impl<__DB: Backend, __ST> Queryable<__ST, __DB> for Cert where
    (i32, String, String, Option<i32>, bool, bool): Queryable<__ST, __DB>, 
[src]

type Row = <(i32, String, String, Option<i32>, bool, bool) as Queryable<__ST, __DB>>::Row

The Rust type you’d like to map from. Read more

fn build(row: Self::Row) -> Self[src]

Construct an instance of this type

impl Eq for Cert[src]

impl StructuralEq for Cert[src]

impl StructuralPartialEq for Cert[src]

Auto Trait Implementations

impl RefUnwindSafe for Cert

impl Send for Cert

impl Sync for Cert

impl Unpin for Cert

impl UnwindSafe for Cert

Blanket Implementations

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

pub fn type_id(&self) -> TypeId[src]

Gets the TypeId of self. Read more

impl<'a, Parent, Child> BelongingToDsl<&'a [Parent]> for Child where
    Child: HasTable + BelongsTo<Parent>,
    &'a Parent: Identifiable,
    Vec<<&'a Parent as Identifiable>::Id, Global>: AsInExpression<<<Child as BelongsTo<Parent>>::ForeignKeyColumn as Expression>::SqlType>,
    <Child as HasTable>::Table: FilterDsl<In<<Child as BelongsTo<Parent>>::ForeignKeyColumn, <Vec<<&'a Parent as Identifiable>::Id, Global> as AsInExpression<<<Child as BelongsTo<Parent>>::ForeignKeyColumn as Expression>::SqlType>>::InExpression>>,
    <Child as BelongsTo<Parent>>::ForeignKeyColumn: ExpressionMethods
[src]

type Output = <<Child as HasTable>::Table as FilterDsl<In<<Child as BelongsTo<Parent>>::ForeignKeyColumn, <Vec<<&'a Parent as Identifiable>::Id, Global> as AsInExpression<<<Child as BelongsTo<Parent>>::ForeignKeyColumn as Expression>::SqlType>>::InExpression>>>::Output

The query returned by belonging_to

pub fn belonging_to(
    parents: &'a [Parent]
) -> <Child as BelongingToDsl<&'a [Parent]>>::Output
[src]

Get the record(s) belonging to record(s) other

impl<'a, Parent, Child> BelongingToDsl<&'a Vec<Parent, Global>> for Child where
    Child: BelongingToDsl<&'a [Parent]>, 
[src]

type Output = <Child as BelongingToDsl<&'a [Parent]>>::Output

The query returned by belonging_to

pub fn belonging_to(
    parents: &'a Vec<Parent, Global>
) -> <Child as BelongingToDsl<&'a Vec<Parent, Global>>>::Output
[src]

Get the record(s) belonging to record(s) other

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

pub fn borrow(&self) -> &T[src]

Immutably borrows from an owned value. Read more

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

pub fn borrow_mut(&mut self) -> &mut T[src]

Mutably borrows from an owned value. Read more

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

pub fn __clone_box(&self, Private) -> *mut ()[src]

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

pub fn equivalent(&self, key: &K) -> bool[src]

Compare self to key and return true if they are equal.

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

pub fn from(t: T) -> T[src]

Performs the conversion.

impl<T> Instrument for T[src]

fn instrument(self, span: Span) -> Instrumented<Self>[src]

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more

fn in_current_span(self) -> Instrumented<Self>[src]

Instruments this type with the current Span, returning an Instrumented wrapper. Read more

impl<T> Instrument for T[src]

fn instrument(self, span: Span) -> Instrumented<Self>[src]

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more

fn in_current_span(self) -> Instrumented<Self>[src]

Instruments this type with the current Span, returning an Instrumented wrapper. Read more

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

pub fn into(self) -> U[src]

Performs the conversion.

impl<T> IntoSql for T[src]

fn into_sql<T>(self) -> Self::Expression where
    Self: AsExpression<T>, 
[src]

Convert self to an expression for Diesel’s query builder. Read more

fn as_sql<'a, T>(&'a self) -> <&'a Self as AsExpression<T>>::Expression where
    &'a Self: AsExpression<T>, 
[src]

Convert &self to an expression for Diesel’s query builder. Read more

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.

pub fn to_owned(&self) -> T[src]

Creates owned data from borrowed data, usually by cloning. Read more

pub fn clone_into(&self, target: &mut T)[src]

🔬 This is a nightly-only experimental API. (toowned_clone_into)

recently added

Uses borrowed data to replace owned data, usually by cloning. Read more

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.

pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>[src]

Performs the conversion.

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.

pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>[src]

Performs the conversion.