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<(), AcceptInviteLinkError>
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<(), AcceptInviteLinkError>
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.
§Errors
Server-reported failures are mapped onto typed variants: a 404 from any of the acceptance
endpoints becomes AcceptInviteLinkError::LinkNotFound, and a 400 validation
problem becomes the variant matching its error code (or
AcceptInviteLinkError::Unknown, carrying the server’s English description, for an
unrecognized code). Responses in the legacy error format carry no code and remain
AcceptInviteLinkError::Api.
Trait Implementations§
§impl FromClient for InviteLinkUserClient
impl FromClient for InviteLinkUserClient
§fn from_client(client: &Client) -> InviteLinkUserClient
fn from_client(client: &Client) -> InviteLinkUserClient
Client reference.§impl FromWasm for InviteLinkUserClient
Available on crate feature wasm only.
impl FromWasm for InviteLinkUserClient
wasm only.§type Wire = InviteLinkUserClient
type Wire = InviteLinkUserClient
§fn from_wire(
wire: <InviteLinkUserClient as FromWasm>::Wire,
) -> Result<InviteLinkUserClient, WireError>
fn from_wire( wire: <InviteLinkUserClient as FromWasm>::Wire, ) -> Result<InviteLinkUserClient, WireError>
§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>
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
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
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
None branch of this option. Read more§impl RefFromWasmAbi for InviteLinkUserClient
impl RefFromWasmAbi for InviteLinkUserClient
§type Anchor = RcRef<InviteLinkUserClient>
type Anchor = RcRef<InviteLinkUserClient>
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>
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
RefFromWasmAbi::ref_from_abi§impl ToWasm for InviteLinkUserClient
Available on crate feature wasm only.
impl ToWasm for InviteLinkUserClient
wasm only.§type Wire = InviteLinkUserClient
type Wire = InviteLinkUserClient
§fn to_wire(self) -> Result<<InviteLinkUserClient as ToWasm>::Wire, WireError>
fn to_wire(self) -> Result<<InviteLinkUserClient as ToWasm>::Wire, WireError>
§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>
§fn try_from_js_value_ref(value: &JsValue) -> Option<InviteLinkUserClient>
fn try_from_js_value_ref(value: &JsValue) -> Option<InviteLinkUserClient>
§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
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
§unsafe fn clone_handle(handle: Handle) -> Handle
unsafe fn clone_handle(handle: Handle) -> Handle
§unsafe fn consume_handle(handle: Handle) -> Arc<T> ⓘ
unsafe fn consume_handle(handle: Handle) -> Arc<T> ⓘ
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> ⓘ
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> ⓘ
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
IntoWasmAbi::AbiSource§fn return_abi(self) -> <T as ReturnWasmAbi>::Abi
fn return_abi(self) -> <T as ReturnWasmAbi>::Abi
IntoWasmAbi::into_abi, except that it may throw and never
return in the case of Err.