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
impl<'update> AsChangeset for &'update Cert
§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
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
fn as_changeset(self) -> Self::Changeset
Convert
self
into the actual update statement being executedsource§impl<'update> AsChangeset for Cert
impl<'update> AsChangeset for Cert
§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
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
fn as_changeset(self) -> Self::Changeset
Convert
self
into the actual update statement being executedsource§impl<__FK> BelongsTo<Cert> for CertEmailwhere
__FK: Hash + Eq,
for<'__a> &'__a i32: Into<Option<&'__a __FK>>,
for<'__a> &'__a Cert: Identifiable<Id = &'__a __FK>,
impl<__FK> BelongsTo<Cert> for CertEmailwhere
__FK: Hash + Eq,
for<'__a> &'__a i32: Into<Option<&'__a __FK>>,
for<'__a> &'__a Cert: Identifiable<Id = &'__a __FK>,
§type ForeignKey = __FK
type ForeignKey = __FK
The foreign key of this struct
§type ForeignKeyColumn = cert_id
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>
fn foreign_key(&self) -> Option<&Self::ForeignKey>
Returns the foreign key for
self
source§fn foreign_key_column() -> Self::ForeignKeyColumn
fn foreign_key_column() -> Self::ForeignKeyColumn
Returns the foreign key column of this struct’s table
source§impl<__FK> BelongsTo<Cert> for Revocationwhere
__FK: Hash + Eq,
for<'__a> &'__a i32: Into<Option<&'__a __FK>>,
for<'__a> &'__a Cert: Identifiable<Id = &'__a __FK>,
impl<__FK> BelongsTo<Cert> for Revocationwhere
__FK: Hash + Eq,
for<'__a> &'__a i32: Into<Option<&'__a __FK>>,
for<'__a> &'__a Cert: Identifiable<Id = &'__a __FK>,
§type ForeignKey = __FK
type ForeignKey = __FK
The foreign key of this struct
§type ForeignKeyColumn = cert_id
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>
fn foreign_key(&self) -> Option<&Self::ForeignKey>
Returns the foreign key for
self
source§fn foreign_key_column() -> Self::ForeignKeyColumn
fn foreign_key_column() -> Self::ForeignKeyColumn
Returns the foreign key column of this struct’s table
source§impl BelongsTo<User> for Cert
impl BelongsTo<User> for Cert
§type ForeignKey = i32
type ForeignKey = i32
The foreign key of this struct
§type ForeignKeyColumn = user_id
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>
fn foreign_key(&self) -> Option<&Self::ForeignKey>
Returns the foreign key for
self
source§fn foreign_key_column() -> Self::ForeignKeyColumn
fn foreign_key_column() -> Self::ForeignKeyColumn
Returns the foreign key column of this struct’s table
source§impl<'ident> Identifiable for &'ident Cert
impl<'ident> Identifiable for &'ident Cert
source§impl PartialEq for Cert
impl PartialEq for Cert
impl Eq for Cert
impl StructuralEq for Cert
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<'a, Parent, Child> BelongingToDsl<&'a [Parent]> for Childwhere
&'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,
impl<'a, Parent, Child> BelongingToDsl<&'a [Parent]> for Childwhere
&'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
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
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 Childwhere
Child: BelongingToDsl<&'a [Parent]>,
impl<'a, Parent, Child> BelongingToDsl<&'a Vec<Parent>> for Childwhere
Child: BelongingToDsl<&'a [Parent]>,
§type Output = <Child as BelongingToDsl<&'a [Parent]>>::Output
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
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> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
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
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> IntoSql for T
impl<T> IntoSql for T
source§fn into_sql<T>(self) -> Self::Expressionwhere
Self: AsExpression<T> + Sized,
fn into_sql<T>(self) -> Self::Expressionwhere
Self: AsExpression<T> + Sized,
Convert
self
to an expression for Diesel’s query builder. Read moresource§fn as_sql<'a, T>(&'a self) -> <&'a Self as AsExpression<T>>::Expressionwhere
&'a Self: AsExpression<T>,
fn as_sql<'a, T>(&'a self) -> <&'a Self as AsExpression<T>>::Expressionwhere
&'a Self: AsExpression<T>,
Convert
&self
to an expression for Diesel’s query builder. Read more