pub struct InviteStore;Implementations§
Source§impl InviteStore
impl InviteStore
pub async fn list_pending(db: &DbHandle, scope: ScopeRef) -> Result<Vec<Model>>
pub async fn find_pending_by_email( db: &DbHandle, scope: ScopeRef, email: &str, ) -> Result<Option<Model>>
pub async fn create( db: &DbHandle, scope: ScopeRef, email: &str, role: &str, invited_by: i64, ) -> Result<Model>
pub async fn revoke(db: &DbHandle, id: i64) -> Result<()>
pub async fn accept_pending_for_email( db: &DbHandle, user_id: i64, email: &str, ) -> Result<u32>
pub async fn accept_pending_for_email_with( db: &DbHandle, user_id: i64, email: &str, opts: MutateOpts<'_>, ) -> Result<u32>
pub async fn find_by_token(db: &DbHandle, token: &str) -> Result<Option<Model>>
Sourcepub async fn accept_by_token(
db: &DbHandle,
user_id: i64,
user_email: &str,
token: &str,
) -> Result<Model>
pub async fn accept_by_token( db: &DbHandle, user_id: i64, user_email: &str, token: &str, ) -> Result<Model>
Accept a pending invite by token. Email on the invite must match user_email.
pub async fn accept_by_token_with( db: &DbHandle, user_id: i64, user_email: &str, token: &str, opts: MutateOpts<'_>, ) -> Result<Model>
Auto Trait Implementations§
impl Freeze for InviteStore
impl RefUnwindSafe for InviteStore
impl Send for InviteStore
impl Sync for InviteStore
impl Unpin for InviteStore
impl UnsafeUnpin for InviteStore
impl UnwindSafe for InviteStore
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<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
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 moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
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