pub struct Invite {
pub id: String,
pub user_uuid: Uuid,
pub guild_uuid: Uuid,
}Expand description
Server invite struct
Fields§
§id: Stringcase-sensitive alphanumeric string with a fixed length of 8 characters, can be up to 32 characters for custom invites
user_uuid: UuidUser that created the invite
guild_uuid: UuidUUID of the guild that the invite belongs to
Implementations§
Trait Implementations§
Source§impl<'insert> Insertable<table> for &'insert Invite
impl<'insert> Insertable<table> for &'insert Invite
Source§type Values = <(Option<Grouped<Eq<id, <&'insert String as AsExpression<<id as Expression>::SqlType>>::Expression>>>, Option<Grouped<Eq<user_uuid, <&'insert Uuid as AsExpression<<user_uuid as Expression>::SqlType>>::Expression>>>, Option<Grouped<Eq<guild_uuid, <&'insert Uuid as AsExpression<<guild_uuid as Expression>::SqlType>>::Expression>>>) as Insertable<table>>::Values
type Values = <(Option<Grouped<Eq<id, <&'insert String as AsExpression<<id as Expression>::SqlType>>::Expression>>>, Option<Grouped<Eq<user_uuid, <&'insert Uuid as AsExpression<<user_uuid as Expression>::SqlType>>::Expression>>>, Option<Grouped<Eq<guild_uuid, <&'insert Uuid as AsExpression<<guild_uuid as Expression>::SqlType>>::Expression>>>) as Insertable<table>>::Values
The
VALUES clause to insert these records Read moreSource§fn values(
self,
) -> <(Option<Eq<id, &'insert String>>, Option<Eq<user_uuid, &'insert Uuid>>, Option<Eq<guild_uuid, &'insert Uuid>>) as Insertable<table>>::Values
fn values( self, ) -> <(Option<Eq<id, &'insert String>>, Option<Eq<user_uuid, &'insert Uuid>>, Option<Eq<guild_uuid, &'insert Uuid>>) as Insertable<table>>::Values
Construct
Self::Values Read more§fn insert_into(self, table: T) -> InsertStatement<T, Self::Values>where
T: Table,
Self: Sized,
fn insert_into(self, table: T) -> InsertStatement<T, Self::Values>where
T: Table,
Self: Sized,
Insert
self into a given table. Read moreSource§impl Insertable<table> for Invite
impl Insertable<table> for Invite
Source§type Values = <(Option<Grouped<Eq<id, <String as AsExpression<<id as Expression>::SqlType>>::Expression>>>, Option<Grouped<Eq<user_uuid, <Uuid as AsExpression<<user_uuid as Expression>::SqlType>>::Expression>>>, Option<Grouped<Eq<guild_uuid, <Uuid as AsExpression<<guild_uuid as Expression>::SqlType>>::Expression>>>) as Insertable<table>>::Values
type Values = <(Option<Grouped<Eq<id, <String as AsExpression<<id as Expression>::SqlType>>::Expression>>>, Option<Grouped<Eq<user_uuid, <Uuid as AsExpression<<user_uuid as Expression>::SqlType>>::Expression>>>, Option<Grouped<Eq<guild_uuid, <Uuid as AsExpression<<guild_uuid as Expression>::SqlType>>::Expression>>>) as Insertable<table>>::Values
The
VALUES clause to insert these records Read moreSource§fn values(
self,
) -> <(Option<Eq<id, String>>, Option<Eq<user_uuid, Uuid>>, Option<Eq<guild_uuid, Uuid>>) as Insertable<table>>::Values
fn values( self, ) -> <(Option<Eq<id, String>>, Option<Eq<user_uuid, Uuid>>, Option<Eq<guild_uuid, Uuid>>) as Insertable<table>>::Values
Construct
Self::Values Read more§fn insert_into(self, table: T) -> InsertStatement<T, Self::Values>where
T: Table,
Self: Sized,
fn insert_into(self, table: T) -> InsertStatement<T, Self::Values>where
T: Table,
Self: Sized,
Insert
self into a given table. Read moreSource§impl<__DB: Backend, __ST0, __ST1, __ST2> Queryable<(__ST0, __ST1, __ST2), __DB> for Invite
impl<__DB: Backend, __ST0, __ST1, __ST2> Queryable<(__ST0, __ST1, __ST2), __DB> for Invite
Source§impl<__DB: Backend> Selectable<__DB> for Invite
impl<__DB: Backend> Selectable<__DB> for Invite
Source§type SelectExpression = (id, user_uuid, guild_uuid)
type SelectExpression = (id, user_uuid, guild_uuid)
The expression you’d like to select. Read more
Source§fn construct_selection() -> Self::SelectExpression
fn construct_selection() -> Self::SelectExpression
Construct an instance of the expression
impl UndecoratedInsertRecord<table> for Invite
Auto Trait Implementations§
impl Freeze for Invite
impl RefUnwindSafe for Invite
impl Send for Invite
impl Sync for Invite
impl Unpin for Invite
impl UnwindSafe for Invite
Blanket Implementations§
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<T> Chain<T> for T
impl<T> Chain<T> for T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§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>
§impl<T> IntoSql for T
impl<T> IntoSql for T
§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
§impl<T, Conn> RunQueryDsl<Conn> for T
impl<T, Conn> RunQueryDsl<Conn> for T
§fn execute<'conn, 'query>(
self,
conn: &'conn mut Conn,
) -> <Conn as AsyncConnection>::ExecuteFuture<'conn, 'query>where
Conn: AsyncConnection + Send,
Self: ExecuteDsl<Conn> + 'query,
fn execute<'conn, 'query>(
self,
conn: &'conn mut Conn,
) -> <Conn as AsyncConnection>::ExecuteFuture<'conn, 'query>where
Conn: AsyncConnection + Send,
Self: ExecuteDsl<Conn> + 'query,
Executes the given command, returning the number of rows affected. Read more
§fn load<'query, 'conn, U>(
self,
conn: &'conn mut Conn,
) -> AndThen<Self::LoadFuture<'conn>, TryCollect<Self::Stream<'conn>, Vec<U>>, fn(Self::Stream<'conn>) -> TryCollect<Self::Stream<'conn>, Vec<U>>>where
U: Send,
Conn: AsyncConnection,
Self: LoadQuery<'query, Conn, U> + 'query,
fn load<'query, 'conn, U>(
self,
conn: &'conn mut Conn,
) -> AndThen<Self::LoadFuture<'conn>, TryCollect<Self::Stream<'conn>, Vec<U>>, fn(Self::Stream<'conn>) -> TryCollect<Self::Stream<'conn>, Vec<U>>>where
U: Send,
Conn: AsyncConnection,
Self: LoadQuery<'query, Conn, U> + 'query,
§fn load_stream<'conn, 'query, U>(
self,
conn: &'conn mut Conn,
) -> Self::LoadFuture<'conn>where
Conn: AsyncConnection,
U: 'conn,
Self: LoadQuery<'query, Conn, U> + 'query,
fn load_stream<'conn, 'query, U>(
self,
conn: &'conn mut Conn,
) -> Self::LoadFuture<'conn>where
Conn: AsyncConnection,
U: 'conn,
Self: LoadQuery<'query, Conn, U> + 'query,
Executes the given query, returning a [
Stream] with the returned rows. Read more§fn get_result<'query, 'conn, U>(
self,
conn: &'conn mut Conn,
) -> AndThen<Self::LoadFuture<'conn>, Map<StreamFuture<Pin<Box<Self::Stream<'conn>>>>, fn((Option<Result<U, Error>>, Pin<Box<Self::Stream<'conn>>>)) -> Result<U, Error>>, fn(Self::Stream<'conn>) -> Map<StreamFuture<Pin<Box<Self::Stream<'conn>>>>, fn((Option<Result<U, Error>>, Pin<Box<Self::Stream<'conn>>>)) -> Result<U, Error>>>where
U: Send + 'conn,
Conn: AsyncConnection,
Self: LoadQuery<'query, Conn, U> + 'query,
fn get_result<'query, 'conn, U>(
self,
conn: &'conn mut Conn,
) -> AndThen<Self::LoadFuture<'conn>, Map<StreamFuture<Pin<Box<Self::Stream<'conn>>>>, fn((Option<Result<U, Error>>, Pin<Box<Self::Stream<'conn>>>)) -> Result<U, Error>>, fn(Self::Stream<'conn>) -> Map<StreamFuture<Pin<Box<Self::Stream<'conn>>>>, fn((Option<Result<U, Error>>, Pin<Box<Self::Stream<'conn>>>)) -> Result<U, Error>>>where
U: Send + 'conn,
Conn: AsyncConnection,
Self: LoadQuery<'query, Conn, U> + 'query,
Runs the command, and returns the affected row. Read more
§fn get_results<'query, 'conn, U>(
self,
conn: &'conn mut Conn,
) -> AndThen<Self::LoadFuture<'conn>, TryCollect<Self::Stream<'conn>, Vec<U>>, fn(Self::Stream<'conn>) -> TryCollect<Self::Stream<'conn>, Vec<U>>>where
U: Send,
Conn: AsyncConnection,
Self: LoadQuery<'query, Conn, U> + 'query,
fn get_results<'query, 'conn, U>(
self,
conn: &'conn mut Conn,
) -> AndThen<Self::LoadFuture<'conn>, TryCollect<Self::Stream<'conn>, Vec<U>>, fn(Self::Stream<'conn>) -> TryCollect<Self::Stream<'conn>, Vec<U>>>where
U: Send,
Conn: AsyncConnection,
Self: LoadQuery<'query, Conn, U> + 'query,
Runs the command, returning an
Vec with the affected rows. Read more§fn first<'query, 'conn, U>(
self,
conn: &'conn mut Conn,
) -> AndThen<<Self::Output as LoadQuery<'query, Conn, U>>::LoadFuture<'conn>, Map<StreamFuture<Pin<Box<<Self::Output as LoadQuery<'query, Conn, U>>::Stream<'conn>>>>, fn((Option<Result<U, Error>>, Pin<Box<<Self::Output as LoadQuery<'query, Conn, U>>::Stream<'conn>>>)) -> Result<U, Error>>, fn(<Self::Output as LoadQuery<'query, Conn, U>>::Stream<'conn>) -> Map<StreamFuture<Pin<Box<<Self::Output as LoadQuery<'query, Conn, U>>::Stream<'conn>>>>, fn((Option<Result<U, Error>>, Pin<Box<<Self::Output as LoadQuery<'query, Conn, U>>::Stream<'conn>>>)) -> Result<U, Error>>>
fn first<'query, 'conn, U>( self, conn: &'conn mut Conn, ) -> AndThen<<Self::Output as LoadQuery<'query, Conn, U>>::LoadFuture<'conn>, Map<StreamFuture<Pin<Box<<Self::Output as LoadQuery<'query, Conn, U>>::Stream<'conn>>>>, fn((Option<Result<U, Error>>, Pin<Box<<Self::Output as LoadQuery<'query, Conn, U>>::Stream<'conn>>>)) -> Result<U, Error>>, fn(<Self::Output as LoadQuery<'query, Conn, U>>::Stream<'conn>) -> Map<StreamFuture<Pin<Box<<Self::Output as LoadQuery<'query, Conn, U>>::Stream<'conn>>>>, fn((Option<Result<U, Error>>, Pin<Box<<Self::Output as LoadQuery<'query, Conn, U>>::Stream<'conn>>>)) -> Result<U, Error>>>
Attempts to load a single record. Read more
§impl<T, DB> SelectableHelper<DB> for Twhere
T: Selectable<DB>,
DB: Backend,
impl<T, DB> SelectableHelper<DB> for Twhere
T: Selectable<DB>,
DB: Backend,
§fn as_select() -> SelectBy<T, DB>
fn as_select() -> SelectBy<T, DB>
Construct a select clause based on a [
Selectable] implementation. Read more§fn as_returning() -> SelectBy<Self, DB>
fn as_returning() -> SelectBy<Self, DB>
An alias for
as_select that can be used with returning clauses§impl<T, ST, DB> StaticallySizedRow<ST, DB> for Twhere
ST: SqlTypeOrSelectable + TupleSize,
T: Queryable<ST, DB>,
DB: Backend,
impl<T, ST, DB> StaticallySizedRow<ST, DB> for Twhere
ST: SqlTypeOrSelectable + TupleSize,
T: Queryable<ST, DB>,
DB: Backend,
§const FIELD_COUNT: usize = <ST as crate::util::TupleSize>::SIZE
const FIELD_COUNT: usize = <ST as crate::util::TupleSize>::SIZE
The number of fields that this type will consume.