DbUser

Struct DbUser 

Source
pub struct DbUser {
Show 16 fields pub id: OwnedUserId, pub ty: Option<String>, pub is_admin: bool, pub is_guest: bool, pub appservice_id: Option<String>, pub shadow_banned: bool, pub consent_at: Option<UnixMillis>, pub consent_version: Option<String>, pub consent_server_notice_sent: Option<String>, pub approved_at: Option<UnixMillis>, pub approved_by: Option<OwnedUserId>, pub deactivated_at: Option<UnixMillis>, pub deactivated_by: Option<OwnedUserId>, pub locked_at: Option<UnixMillis>, pub locked_by: Option<OwnedUserId>, pub created_at: UnixMillis,
}

Fields§

§id: OwnedUserId§ty: Option<String>§is_admin: bool§is_guest: bool§appservice_id: Option<String>§shadow_banned: bool§consent_at: Option<UnixMillis>§consent_version: Option<String>§consent_server_notice_sent: Option<String>§approved_at: Option<UnixMillis>§approved_by: Option<OwnedUserId>§deactivated_at: Option<UnixMillis>§deactivated_by: Option<OwnedUserId>§locked_at: Option<UnixMillis>§locked_by: Option<OwnedUserId>§created_at: UnixMillis

Implementations§

Trait Implementations§

Source§

impl Clone for DbUser

Source§

fn clone(&self) -> DbUser

Returns a duplicate 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 DbUser

Source§

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

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

impl HasTable for DbUser

Source§

type Table = table

The table this type is associated with.
Source§

fn table() -> <Self as HasTable>::Table

Returns the table this type is associated with.
Source§

impl<'ident> Identifiable for &'ident DbUser

Source§

type Id = &'ident OwnedUserId

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

fn id(self) -> <Self as Identifiable>::Id

Returns the identifier for this record. Read more
Source§

impl<'insert> Insertable<table> for &'insert DbUser

Source§

type Values = <(Option<Grouped<Eq<id, <&'insert OwnedUserId as AsExpression<<id as Expression>::SqlType>>::Expression>>>, Option<Grouped<Eq<ty, <&'insert String as AsExpression<<ty as Expression>::SqlType>>::Expression>>>, Option<Grouped<Eq<is_admin, <&'insert bool as AsExpression<<is_admin as Expression>::SqlType>>::Expression>>>, Option<Grouped<Eq<is_guest, <&'insert bool as AsExpression<<is_guest as Expression>::SqlType>>::Expression>>>, Option<Grouped<Eq<appservice_id, <&'insert String as AsExpression<<appservice_id as Expression>::SqlType>>::Expression>>>, Option<Grouped<Eq<shadow_banned, <&'insert bool as AsExpression<<shadow_banned as Expression>::SqlType>>::Expression>>>, Option<Grouped<Eq<consent_at, <&'insert UnixMillis as AsExpression<<consent_at as Expression>::SqlType>>::Expression>>>, Option<Grouped<Eq<consent_version, <&'insert String as AsExpression<<consent_version as Expression>::SqlType>>::Expression>>>, Option<Grouped<Eq<consent_server_notice_sent, <&'insert String as AsExpression<<consent_server_notice_sent as Expression>::SqlType>>::Expression>>>, Option<Grouped<Eq<approved_at, <&'insert UnixMillis as AsExpression<<approved_at as Expression>::SqlType>>::Expression>>>, Option<Grouped<Eq<approved_by, <&'insert OwnedUserId as AsExpression<<approved_by as Expression>::SqlType>>::Expression>>>, Option<Grouped<Eq<deactivated_at, <&'insert UnixMillis as AsExpression<<deactivated_at as Expression>::SqlType>>::Expression>>>, Option<Grouped<Eq<deactivated_by, <&'insert OwnedUserId as AsExpression<<deactivated_by as Expression>::SqlType>>::Expression>>>, Option<Grouped<Eq<locked_at, <&'insert UnixMillis as AsExpression<<locked_at as Expression>::SqlType>>::Expression>>>, Option<Grouped<Eq<locked_by, <&'insert OwnedUserId as AsExpression<<locked_by as Expression>::SqlType>>::Expression>>>, Option<Grouped<Eq<created_at, <&'insert UnixMillis as AsExpression<<created_at as Expression>::SqlType>>::Expression>>>) as Insertable<table>>::Values

The VALUES clause to insert these records Read more
Source§

fn values( self, ) -> <(Option<Eq<id, &'insert OwnedUserId>>, Option<Eq<ty, &'insert String>>, Option<Eq<is_admin, &'insert bool>>, Option<Eq<is_guest, &'insert bool>>, Option<Eq<appservice_id, &'insert String>>, Option<Eq<shadow_banned, &'insert bool>>, Option<Eq<consent_at, &'insert UnixMillis>>, Option<Eq<consent_version, &'insert String>>, Option<Eq<consent_server_notice_sent, &'insert String>>, Option<Eq<approved_at, &'insert UnixMillis>>, Option<Eq<approved_by, &'insert OwnedUserId>>, Option<Eq<deactivated_at, &'insert UnixMillis>>, Option<Eq<deactivated_by, &'insert OwnedUserId>>, Option<Eq<locked_at, &'insert UnixMillis>>, Option<Eq<locked_by, &'insert OwnedUserId>>, Option<Eq<created_at, &'insert UnixMillis>>) as Insertable<table>>::Values

Construct Self::Values Read more
Source§

fn insert_into(self, table: T) -> InsertStatement<T, Self::Values>
where T: Table, Self: Sized,

Insert self into a given table. Read more
Source§

impl Insertable<table> for DbUser

Source§

type Values = <(Option<Grouped<Eq<id, <OwnedUserId as AsExpression<<id as Expression>::SqlType>>::Expression>>>, Option<Grouped<Eq<ty, <String as AsExpression<<ty as Expression>::SqlType>>::Expression>>>, Option<Grouped<Eq<is_admin, <bool as AsExpression<<is_admin as Expression>::SqlType>>::Expression>>>, Option<Grouped<Eq<is_guest, <bool as AsExpression<<is_guest as Expression>::SqlType>>::Expression>>>, Option<Grouped<Eq<appservice_id, <String as AsExpression<<appservice_id as Expression>::SqlType>>::Expression>>>, Option<Grouped<Eq<shadow_banned, <bool as AsExpression<<shadow_banned as Expression>::SqlType>>::Expression>>>, Option<Grouped<Eq<consent_at, <UnixMillis as AsExpression<<consent_at as Expression>::SqlType>>::Expression>>>, Option<Grouped<Eq<consent_version, <String as AsExpression<<consent_version as Expression>::SqlType>>::Expression>>>, Option<Grouped<Eq<consent_server_notice_sent, <String as AsExpression<<consent_server_notice_sent as Expression>::SqlType>>::Expression>>>, Option<Grouped<Eq<approved_at, <UnixMillis as AsExpression<<approved_at as Expression>::SqlType>>::Expression>>>, Option<Grouped<Eq<approved_by, <OwnedUserId as AsExpression<<approved_by as Expression>::SqlType>>::Expression>>>, Option<Grouped<Eq<deactivated_at, <UnixMillis as AsExpression<<deactivated_at as Expression>::SqlType>>::Expression>>>, Option<Grouped<Eq<deactivated_by, <OwnedUserId as AsExpression<<deactivated_by as Expression>::SqlType>>::Expression>>>, Option<Grouped<Eq<locked_at, <UnixMillis as AsExpression<<locked_at as Expression>::SqlType>>::Expression>>>, Option<Grouped<Eq<locked_by, <OwnedUserId as AsExpression<<locked_by as Expression>::SqlType>>::Expression>>>, Option<Grouped<Eq<created_at, <UnixMillis as AsExpression<<created_at as Expression>::SqlType>>::Expression>>>) as Insertable<table>>::Values

The VALUES clause to insert these records Read more
Source§

fn values( self, ) -> <(Option<Eq<id, OwnedUserId>>, Option<Eq<ty, String>>, Option<Eq<is_admin, bool>>, Option<Eq<is_guest, bool>>, Option<Eq<appservice_id, String>>, Option<Eq<shadow_banned, bool>>, Option<Eq<consent_at, UnixMillis>>, Option<Eq<consent_version, String>>, Option<Eq<consent_server_notice_sent, String>>, Option<Eq<approved_at, UnixMillis>>, Option<Eq<approved_by, OwnedUserId>>, Option<Eq<deactivated_at, UnixMillis>>, Option<Eq<deactivated_by, OwnedUserId>>, Option<Eq<locked_at, UnixMillis>>, Option<Eq<locked_by, OwnedUserId>>, Option<Eq<created_at, UnixMillis>>) as Insertable<table>>::Values

Construct Self::Values Read more
Source§

fn insert_into(self, table: T) -> InsertStatement<T, Self::Values>
where T: Table, Self: Sized,

Insert self into a given table. Read more
Source§

impl<__DB: Backend, __ST0, __ST1, __ST2, __ST3, __ST4, __ST5, __ST6, __ST7, __ST8, __ST9, __ST10, __ST11, __ST12, __ST13, __ST14, __ST15> Queryable<(__ST0, __ST1, __ST2, __ST3, __ST4, __ST5, __ST6, __ST7, __ST8, __ST9, __ST10, __ST11, __ST12, __ST13, __ST14, __ST15), __DB> for DbUser

Source§

impl UndecoratedInsertRecord<table> for DbUser

Auto Trait Implementations§

§

impl Freeze for DbUser

§

impl RefUnwindSafe for DbUser

§

impl Send for DbUser

§

impl Sync for DbUser

§

impl Unpin for DbUser

§

impl UnwindSafe for DbUser

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<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> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, W> HasTypeWitness<W> for T
where W: MakeTypeWitness<Arg = T>, T: ?Sized,

Source§

const WITNESS: W = W::MAKE

A constant of the type witness
Source§

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

Source§

const TYPE_EQ: TypeEq<T, <T as Identity>::Type> = TypeEq::NEW

Proof that Self is the same type as Self::Type, provides methods for casting between Self and Self::Type.
Source§

type Type = T

The same type as Self, used to emulate type equality bounds (T == U) with associated type equality constraints (T: Identity<Type = U>).
Source§

impl<T> Instrument for T

Source§

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

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

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> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> if into_left is true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> if into_left(&self) returns true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

impl<T> IntoSql for T

Source§

fn into_sql<T>(self) -> Self::Expression

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
where &'a Self: AsExpression<T>, T: SqlType + TypedExpressionType,

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

impl<T> Pointable for T

Source§

const ALIGN: usize

The alignment of pointer.
Source§

type Init = T

The type for initializers.
Source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
Source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
Source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
Source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
Source§

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

Source§

fn and<P, B, E>(self, other: P) -> And<T, P>
where T: Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow only if self and other return Action::Follow. Read more
Source§

fn or<P, B, E>(self, other: P) -> Or<T, P>
where T: Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow if either self or other returns Action::Follow. Read more
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T, ST, DB> StaticallySizedRow<ST, DB> for T
where ST: SqlTypeOrSelectable + TupleSize, T: Queryable<ST, DB>, DB: Backend,

Source§

const FIELD_COUNT: usize = <ST as crate::util::TupleSize>::SIZE

The number of fields that this type will consume.
Source§

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

Source§

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>,

Source§

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>,

Source§

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.
Source§

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

Source§

fn vzip(self) -> V

Source§

impl<T> WithSubscriber for T

Source§

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

fn with_current_subscriber(self) -> WithDispatch<Self>

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

impl<T> ErasedDestructor for T
where T: 'static,