Struct InviteLinkUserClient
pub struct InviteLinkUserClient {
pub(crate) key_store: KeyStore<KeySlotIds>,
pub(crate) api_configurations: Arc<ApiConfigurations>,
}Expand description
Client for organization invite link invitee (user) operations: checking link status, validating email eligibility, and accepting or self-confirming an invite.
Fields§
§key_store: KeyStore<KeySlotIds>§api_configurations: Arc<ApiConfigurations>Implementations§
§impl InviteLinkUserClient
impl InviteLinkUserClient
pub async fn get_status(
&self,
organization_id: OrganizationId,
code: String,
) -> Result<OrganizationInviteLinkStatusView, InviteLinkError>
pub async fn get_status( &self, organization_id: OrganizationId, code: String, ) -> Result<OrganizationInviteLinkStatusView, InviteLinkError>
Retrieves the status of an invite link. Used to verify basic availability before attempting to accept.
pub async fn is_email_allowed(
&self,
organization_id: OrganizationId,
code: String,
email: String,
) -> Result<bool, InviteLinkError>
pub async fn is_email_allowed( &self, organization_id: OrganizationId, code: String, email: String, ) -> Result<bool, InviteLinkError>
Returns whether the given email address is in the allowed domains for an invite link.
pub async fn accept_and_optionally_confirm(
&self,
organization_id: OrganizationId,
code: String,
invite_secret: InviteSecret,
default_collection_name: String,
enroll_into_account_recovery: bool,
) -> Result<(), InviteLinkError>
pub async fn accept_and_optionally_confirm( &self, organization_id: OrganizationId, code: String, invite_secret: InviteSecret, default_collection_name: String, enroll_into_account_recovery: bool, ) -> Result<(), InviteLinkError>
Accepts an organization invite for the current user, optionally enrolling into account
recovery (when enroll_into_account_recovery is set) and — when the invite supports
confirmation — self-confirming.
Trait Implementations§
§impl FromClient for InviteLinkUserClient
impl FromClient for InviteLinkUserClient
§fn from_client(client: &Client) -> InviteLinkUserClient
fn from_client(client: &Client) -> InviteLinkUserClient
Construct this type from a [
Client] reference.§impl FromWasmAbi for InviteLinkUserClient
impl FromWasmAbi for InviteLinkUserClient
§impl IntoWasmAbi for InviteLinkUserClient
impl IntoWasmAbi for InviteLinkUserClient
§impl LongRefFromWasmAbi for InviteLinkUserClient
impl LongRefFromWasmAbi for InviteLinkUserClient
§type Anchor = RcRef<InviteLinkUserClient>
type Anchor = RcRef<InviteLinkUserClient>
Same as
RefFromWasmAbi::Anchor§unsafe fn long_ref_from_abi(
js: <InviteLinkUserClient as LongRefFromWasmAbi>::Abi,
) -> <InviteLinkUserClient as LongRefFromWasmAbi>::Anchor
unsafe fn long_ref_from_abi( js: <InviteLinkUserClient as LongRefFromWasmAbi>::Abi, ) -> <InviteLinkUserClient as LongRefFromWasmAbi>::Anchor
Same as
RefFromWasmAbi::ref_from_abi§impl OptionFromWasmAbi for InviteLinkUserClient
impl OptionFromWasmAbi for InviteLinkUserClient
§fn is_none(abi: &<InviteLinkUserClient as FromWasmAbi>::Abi) -> bool
fn is_none(abi: &<InviteLinkUserClient as FromWasmAbi>::Abi) -> bool
Tests whether the argument is a “none” instance. If so it will be
deserialized as
None, and otherwise it will be passed to
FromWasmAbi.§impl OptionIntoWasmAbi for InviteLinkUserClient
impl OptionIntoWasmAbi for InviteLinkUserClient
§fn none() -> <InviteLinkUserClient as IntoWasmAbi>::Abi
fn none() -> <InviteLinkUserClient as IntoWasmAbi>::Abi
Returns an ABI instance indicating “none”, which JS will interpret as
the
None branch of this option. Read more§impl RefFromWasmAbi for InviteLinkUserClient
impl RefFromWasmAbi for InviteLinkUserClient
§type Anchor = RcRef<InviteLinkUserClient>
type Anchor = RcRef<InviteLinkUserClient>
The type that holds the reference to
Self for the duration of the
invocation of the function that has an &Self parameter. This is
required to ensure that the lifetimes don’t persist beyond one function
call, and so that they remain anonymous.§unsafe fn ref_from_abi(
js: <InviteLinkUserClient as RefFromWasmAbi>::Abi,
) -> <InviteLinkUserClient as RefFromWasmAbi>::Anchor
unsafe fn ref_from_abi( js: <InviteLinkUserClient as RefFromWasmAbi>::Abi, ) -> <InviteLinkUserClient as RefFromWasmAbi>::Anchor
§impl RefMutFromWasmAbi for InviteLinkUserClient
impl RefMutFromWasmAbi for InviteLinkUserClient
§type Anchor = RcRefMut<InviteLinkUserClient>
type Anchor = RcRefMut<InviteLinkUserClient>
Same as
RefFromWasmAbi::Anchor§unsafe fn ref_mut_from_abi(
js: <InviteLinkUserClient as RefMutFromWasmAbi>::Abi,
) -> <InviteLinkUserClient as RefMutFromWasmAbi>::Anchor
unsafe fn ref_mut_from_abi( js: <InviteLinkUserClient as RefMutFromWasmAbi>::Abi, ) -> <InviteLinkUserClient as RefMutFromWasmAbi>::Anchor
Same as
RefFromWasmAbi::ref_from_abi§impl TryFromJsValue for InviteLinkUserClient
impl TryFromJsValue for InviteLinkUserClient
§fn try_from_js_value(value: JsValue) -> Result<InviteLinkUserClient, JsValue>
fn try_from_js_value(value: JsValue) -> Result<InviteLinkUserClient, JsValue>
Performs the conversion.
§fn try_from_js_value_ref(value: &JsValue) -> Option<InviteLinkUserClient>
fn try_from_js_value_ref(value: &JsValue) -> Option<InviteLinkUserClient>
Performs the conversion.
§impl VectorFromWasmAbi for InviteLinkUserClient
impl VectorFromWasmAbi for InviteLinkUserClient
type Abi = <Box<[JsValue]> as FromWasmAbi>::Abi
unsafe fn vector_from_abi( js: <InviteLinkUserClient as VectorFromWasmAbi>::Abi, ) -> Box<[InviteLinkUserClient]>
§impl VectorIntoWasmAbi for InviteLinkUserClient
impl VectorIntoWasmAbi for InviteLinkUserClient
type Abi = <Box<[JsValue]> as IntoWasmAbi>::Abi
fn vector_into_abi( vector: Box<[InviteLinkUserClient]>, ) -> <InviteLinkUserClient as VectorIntoWasmAbi>::Abi
Auto Trait Implementations§
impl !RefUnwindSafe for InviteLinkUserClient
impl !UnwindSafe for InviteLinkUserClient
impl Freeze for InviteLinkUserClient
impl Send for InviteLinkUserClient
impl Sync for InviteLinkUserClient
impl Unpin for InviteLinkUserClient
impl UnsafeUnpin for InviteLinkUserClient
Blanket Implementations§
§impl<T> AnySync for T
impl<T> AnySync for T
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
§impl<T> CompatExt for T
impl<T> CompatExt for T
§impl<T, UT> HandleAlloc<UT> for T
impl<T, UT> HandleAlloc<UT> for T
§fn new_handle(value: Arc<T>) -> Handle
fn new_handle(value: Arc<T>) -> Handle
Create a new handle for an Arc value Read more
§unsafe fn clone_handle(handle: Handle) -> Handle
unsafe fn clone_handle(handle: Handle) -> Handle
Clone a handle Read more
§unsafe fn consume_handle(handle: Handle) -> Arc<T> ⓘ
unsafe fn consume_handle(handle: Handle) -> Arc<T> ⓘ
Consume a handle, getting back the initial
Arc<> Read more§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> 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§impl<T> Pointable for T
impl<T> Pointable for T
§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> Read<Exclusive, BecauseExclusive> for Twhere
T: ?Sized,
Source§impl<T> ReturnWasmAbi for Twhere
T: IntoWasmAbi,
impl<T> ReturnWasmAbi for Twhere
T: IntoWasmAbi,
Source§type Abi = <T as IntoWasmAbi>::Abi
type Abi = <T as IntoWasmAbi>::Abi
Same as
IntoWasmAbi::AbiSource§fn return_abi(self) -> <T as ReturnWasmAbi>::Abi
fn return_abi(self) -> <T as ReturnWasmAbi>::Abi
Same as
IntoWasmAbi::into_abi, except that it may throw and never
return in the case of Err.