Struct openpgp_ca_lib::db::models::Cert

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

A user certificate as modeled in the CA (linked to users)

Fields§

§id: i32§fingerprint: String§pub_cert: String§user_id: Option<i32>§delisted: bool§inactive: bool

Trait Implementations§

source§

impl<'update> AsChangeset for &'update Cert

§

type Target = table

The table which Self::Changeset will be updating
§

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

The update statement this type represents
source§

fn as_changeset(self) -> Self::Changeset

Convert self into the actual update statement being executed
source§

impl<'update> AsChangeset for Cert

§

type Target = table

The table which Self::Changeset will be updating
§

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

The update statement this type represents
source§

fn as_changeset(self) -> Self::Changeset

Convert self into the actual update statement being executed
source§

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

§

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
source§

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

Returns the foreign key for self
source§

fn foreign_key_column() -> Self::ForeignKeyColumn

Returns the foreign key column of this struct’s table
source§

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

§

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
source§

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

Returns the foreign key for self
source§

fn foreign_key_column() -> Self::ForeignKeyColumn

Returns the foreign key column of this struct’s table
source§

impl BelongsTo<User> for Cert

§

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
source§

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

Returns the foreign key for self
source§

fn foreign_key_column() -> Self::ForeignKeyColumn

Returns the foreign key column of this struct’s table
source§

impl Clone for Cert

source§

fn clone(&self) -> Cert

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for Cert

source§

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

Formats the value using the given formatter. Read more
source§

impl HasTable for Cert

§

type Table = table

The table this type is associated with.
source§

fn table() -> Self::Table

Returns the table this type is associated with.
source§

impl Hash for Cert

source§

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

Feeds this value into the given Hasher. Read more
1.3.0 · source§

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

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

impl<'ident> Identifiable for &'ident Cert

§

type Id = &'ident i32

The type of this struct’s identifier. Read more
source§

fn id(self) -> Self::Id

Returns the identifier for this record. Read more
source§

impl PartialEq for Cert

source§

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

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

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

§

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
source§

fn build(row: Self::Row) -> Self

Construct an instance of this type
source§

impl Eq for Cert

source§

impl StructuralEq for Cert

source§

impl StructuralPartialEq for Cert

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§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<'a, Parent, Child> BelongingToDsl<&'a [Parent]> for Child
where &'a Parent: Identifiable, Child: HasTable + BelongsTo<Parent>, Vec<<&'a Parent as Identifiable>::Id>: 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> as AsInExpression<<<Child as BelongsTo<Parent>>::ForeignKeyColumn as Expression>::SqlType>>::InExpression>>, <Child as BelongsTo<Parent>>::ForeignKeyColumn: ExpressionMethods,

§

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

The query returned by belonging_to
source§

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

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

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

§

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

The query returned by belonging_to
source§

fn belonging_to( parents: &'a Vec<Parent> ) -> <Child as BelongingToDsl<&'a Vec<Parent>>>::Output

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

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> DynClone for T
where T: Clone,

source§

fn __clone_box(&self, _: Private) -> *mut ()

§

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

§

fn equivalent(&self, key: &K) -> bool

Checks if this value is equivalent to the given key. Read more
§

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

§

fn equivalent(&self, key: &K) -> bool

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

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

§

impl<T> Instrument for T

§

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

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

fn in_current_span(self) -> Instrumented<Self>

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

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T> IntoSql for T

source§

fn into_sql<T>(self) -> Self::Expression
where Self: AsExpression<T> + Sized,

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

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

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

impl<T> Same for T

§

type Output = T

Should always be Self
source§

impl<T> ToOwned for T
where T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

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

fn clone_into(&self, target: &mut T)

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

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

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

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

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

The type returned in the event of a conversion error.
source§

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

Performs the conversion.
§

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

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a [WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a [WithDispatch] wrapper. Read more