pub struct Store { /* private fields */ }Implementations§
Trait Implementations§
Source§impl AccountStore for Store
impl AccountStore for Store
Source§fn member(&self, email: &str) -> Result<Option<Who>>
fn member(&self, email: &str) -> Result<Option<Who>>
The member email, with deployment admins always present and admin.
Source§fn remove(&self, by: &str, email: &str) -> Result<()>
fn remove(&self, by: &str, email: &str) -> Result<()>
Remove a member with their sessions, tokens and invitations.
Source§fn invite(
&self,
by: &str,
email: &str,
role: Role,
code: bool,
) -> Result<String>
fn invite( &self, by: &str, email: &str, role: Role, code: bool, ) -> Result<String>
An invitation for email only: a link token, or with code a code to hand over.
Source§fn sign_in_link(&self, email: &str) -> Result<Option<String>>
fn sign_in_link(&self, email: &str) -> Result<Option<String>>
A sign-in link token for a member, or None when email is not one.
Source§fn redeem(&self, token: &str, client: &str) -> Result<(String, Who)>
fn redeem(&self, token: &str, client: &str) -> Result<(String, Who)>
Exchange a sign-in link, an invitation or the admin token for a new session; client
limits how often one place may guess.
Source§fn sign_in_code(
&self,
email: &str,
code: &str,
client: &str,
) -> Result<(String, Who, Option<String>)>
fn sign_in_code( &self, email: &str, code: &str, client: &str, ) -> Result<(String, Who, Option<String>)>
Sign in with an email address and a code: an invitation code, which also issues the
person’s own sign-in code (returned once), or that sign-in code.
client identifies where the attempt comes from: wrong codes pause that address for that
client only, so nobody can lock another person out.
Source§fn sign_in_verified(
&self,
email: &str,
how: &str,
join: bool,
) -> Result<(String, Who)>
fn sign_in_verified( &self, email: &str, how: &str, join: bool, ) -> Result<(String, Who)>
A member, someone invited (who joins with the invitation’s role) or, with join, a
newcomer who joins as a viewer; the identity provider has already checked who they are.
Source§fn reset_code(
&self,
by: &str,
email: &str,
keep: Option<&str>,
) -> Result<String>
fn reset_code( &self, by: &str, email: &str, keep: Option<&str>, ) -> Result<String>
Give email a new sign-in code; their sessions end, except keep (the caller’s own).
Source§fn create_token(
&self,
who: &Who,
name: &str,
expires_in_days: Option<u32>,
) -> Result<String>
fn create_token( &self, who: &Who, name: &str, expires_in_days: Option<u32>, ) -> Result<String>
A personal access token for agents; its value is returned once.
Source§fn tidy(&self)
fn tidy(&self)
fn members(&self) -> Result<Vec<Member>>
fn set_role(&self, by: &str, email: &str, role: Role) -> Result<()>
fn invites(&self) -> Result<Vec<Invite>>
fn revoke_invite(&self, by: &str, email: &str) -> Result<()>
Source§fn admit(&self, email: &str, join: bool) -> Result<Who>
fn admit(&self, email: &str, join: bool) -> Result<Who>
join a
newcomer) who joins now. For callers an identity provider vouched for, such as the gateway.fn sign_out(&self, session: &str, everywhere: bool) -> Result<()>
fn tokens(&self, who: &Who) -> Result<Vec<AccessToken>>
fn revoke_token(&self, who: &Who, id: &str) -> Result<()>
Source§impl Authenticator for Store
impl Authenticator for Store
Source§impl DeviceSignIn for Store
impl DeviceSignIn for Store
Source§fn device_start(&self, client: &str, from: &str) -> Result<(String, String)>
fn device_start(&self, client: &str, from: &str) -> Result<(String, String)>
fn device_info(&self, user_code: &str) -> Option<DeviceRequest>
fn device_approve( &self, who: &Who, user_code: &str, approve: bool, ) -> Result<()>
fn device_poll(&self, device_code: &str) -> Result<DevicePoll>
Source§impl SecretStore for Store
impl SecretStore for Store
Source§fn set_secret(&self, by: &str, name: &str, value: &str) -> Result<()>
fn set_secret(&self, by: &str, name: &str, value: &str) -> Result<()>
Store value under name (an empty value removes it), sealed with COMINDLY_SECRET_KEY.
Source§fn secret_names(&self) -> Vec<String>
fn secret_names(&self) -> Vec<String>
Names of stored secrets.
fn secret(&self, name: &str) -> Option<String>
fn secret_info(&self, name: &str) -> Option<SecretInfo>
Source§impl SettingsStore for Store
impl SettingsStore for Store
fn repos(&self) -> Vec<RepoEntry>
fn set_repos(&self, by: &str, repos: &[RepoEntry]) -> Result<()>
Source§fn legacy_config(&self) -> Option<String>
fn legacy_config(&self) -> Option<String>
config.toml an older server kept, until it has been moved over.fn drop_legacy_config(&self) -> Result<()>
Source§fn log_skip(&self) -> Option<String>
fn log_skip(&self) -> Option<String>
None until one did.fn set_log_skip(&self, by: &str, skip: &str) -> Result<()>
Auto Trait Implementations§
impl !Freeze for Store
impl Forget for Store
impl RefUnwindSafe for Store
impl Send for Store
impl Sync for Store
impl Unpin for Store
impl UnsafeUnpin for Store
impl UnwindSafe for Store
Blanket Implementations§
impl<T> Allocation for T
Source§impl<T> ArchivePointee for T
impl<T> ArchivePointee for T
Source§type ArchivedMetadata = ()
type ArchivedMetadata = ()
Source§fn pointer_metadata(
_: &<T as ArchivePointee>::ArchivedMetadata,
) -> <T as Pointee>::Metadata
fn pointer_metadata( _: &<T as ArchivePointee>::ArchivedMetadata, ) -> <T as Pointee>::Metadata
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> ErasedDestructor for Twhere
T: 'static,
Source§impl<T> FmtForward for T
impl<T> FmtForward for T
Source§fn fmt_binary(self) -> FmtBinary<Self>where
Self: Binary,
fn fmt_binary(self) -> FmtBinary<Self>where
Self: Binary,
self to use its Binary implementation when Debug-formatted.Source§fn fmt_display(self) -> FmtDisplay<Self>where
Self: Display,
fn fmt_display(self) -> FmtDisplay<Self>where
Self: Display,
self to use its Display implementation when
Debug-formatted.Source§fn fmt_lower_exp(self) -> FmtLowerExp<Self>where
Self: LowerExp,
fn fmt_lower_exp(self) -> FmtLowerExp<Self>where
Self: LowerExp,
self to use its LowerExp implementation when
Debug-formatted.Source§fn fmt_lower_hex(self) -> FmtLowerHex<Self>where
Self: LowerHex,
fn fmt_lower_hex(self) -> FmtLowerHex<Self>where
Self: LowerHex,
self to use its LowerHex implementation when
Debug-formatted.Source§fn fmt_octal(self) -> FmtOctal<Self>where
Self: Octal,
fn fmt_octal(self) -> FmtOctal<Self>where
Self: Octal,
self to use its Octal implementation when Debug-formatted.Source§fn fmt_pointer(self) -> FmtPointer<Self>where
Self: Pointer,
fn fmt_pointer(self) -> FmtPointer<Self>where
Self: Pointer,
self to use its Pointer implementation when
Debug-formatted.Source§fn fmt_upper_exp(self) -> FmtUpperExp<Self>where
Self: UpperExp,
fn fmt_upper_exp(self) -> FmtUpperExp<Self>where
Self: UpperExp,
self to use its UpperExp implementation when
Debug-formatted.Source§fn fmt_upper_hex(self) -> FmtUpperHex<Self>where
Self: UpperHex,
fn fmt_upper_hex(self) -> FmtUpperHex<Self>where
Self: UpperHex,
self to use its UpperHex implementation when
Debug-formatted.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> ⓘ
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 moreSource§impl<T> LayoutRaw for T
impl<T> LayoutRaw for T
Source§fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
impl<T> MaybeSend for Twhere
T: Send,
impl<T> MaybeSend for Twhere
T: Send,
Source§impl<T, N1, N2> Niching<NichedOption<T, N1>> for N2
impl<T, N1, N2> Niching<NichedOption<T, N1>> for N2
Source§unsafe fn is_niched(niched: *const NichedOption<T, N1>) -> bool
unsafe fn is_niched(niched: *const NichedOption<T, N1>) -> bool
Source§fn resolve_niched(out: Place<NichedOption<T, N1>>)
fn resolve_niched(out: Place<NichedOption<T, N1>>)
out indicating that a T is niched.Source§impl<T> Pipe for Twhere
T: ?Sized,
impl<T> Pipe for Twhere
T: ?Sized,
Source§fn pipe<R>(self, func: impl FnOnce(Self) -> R) -> Rwhere
Self: Sized,
fn pipe<R>(self, func: impl FnOnce(Self) -> R) -> Rwhere
Self: Sized,
Source§fn pipe_ref<'a, R>(&'a self, func: impl FnOnce(&'a Self) -> R) -> Rwhere
R: 'a,
fn pipe_ref<'a, R>(&'a self, func: impl FnOnce(&'a Self) -> R) -> Rwhere
R: 'a,
self and passes that borrow into the pipe function. Read moreSource§fn pipe_ref_mut<'a, R>(&'a mut self, func: impl FnOnce(&'a mut Self) -> R) -> Rwhere
R: 'a,
fn pipe_ref_mut<'a, R>(&'a mut self, func: impl FnOnce(&'a mut Self) -> R) -> Rwhere
R: 'a,
self and passes that borrow into the pipe function. Read moreSource§fn pipe_borrow<'a, B, R>(&'a self, func: impl FnOnce(&'a B) -> R) -> R
fn pipe_borrow<'a, B, R>(&'a self, func: impl FnOnce(&'a B) -> R) -> R
Source§fn pipe_borrow_mut<'a, B, R>(
&'a mut self,
func: impl FnOnce(&'a mut B) -> R,
) -> R
fn pipe_borrow_mut<'a, B, R>( &'a mut self, func: impl FnOnce(&'a mut B) -> R, ) -> R
Source§fn pipe_as_ref<'a, U, R>(&'a self, func: impl FnOnce(&'a U) -> R) -> R
fn pipe_as_ref<'a, U, R>(&'a self, func: impl FnOnce(&'a U) -> R) -> R
self, then passes self.as_ref() into the pipe function.Source§fn pipe_as_mut<'a, U, R>(&'a mut self, func: impl FnOnce(&'a mut U) -> R) -> R
fn pipe_as_mut<'a, U, R>(&'a mut self, func: impl FnOnce(&'a mut U) -> R) -> R
self, then passes self.as_mut() into the pipe
function.Source§fn pipe_deref<'a, T, R>(&'a self, func: impl FnOnce(&'a T) -> R) -> R
fn pipe_deref<'a, T, R>(&'a self, func: impl FnOnce(&'a T) -> R) -> R
self, then passes self.deref() into the pipe function.Source§impl<T> Pointable for T
impl<T> Pointable for T
Source§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> Tap for T
impl<T> Tap for T
Source§fn tap_borrow<B>(self, func: impl FnOnce(&B)) -> Self
fn tap_borrow<B>(self, func: impl FnOnce(&B)) -> Self
Borrow<B> of a value. Read moreSource§fn tap_borrow_mut<B>(self, func: impl FnOnce(&mut B)) -> Self
fn tap_borrow_mut<B>(self, func: impl FnOnce(&mut B)) -> Self
BorrowMut<B> of a value. Read moreSource§fn tap_ref<R>(self, func: impl FnOnce(&R)) -> Self
fn tap_ref<R>(self, func: impl FnOnce(&R)) -> Self
AsRef<R> view of a value. Read moreSource§fn tap_ref_mut<R>(self, func: impl FnOnce(&mut R)) -> Self
fn tap_ref_mut<R>(self, func: impl FnOnce(&mut R)) -> Self
AsMut<R> view of a value. Read moreSource§fn tap_deref<T>(self, func: impl FnOnce(&T)) -> Self
fn tap_deref<T>(self, func: impl FnOnce(&T)) -> Self
Deref::Target of a value. Read moreSource§fn tap_deref_mut<T>(self, func: impl FnOnce(&mut T)) -> Self
fn tap_deref_mut<T>(self, func: impl FnOnce(&mut T)) -> Self
Deref::Target of a value. Read moreSource§fn tap_dbg(self, func: impl FnOnce(&Self)) -> Self
fn tap_dbg(self, func: impl FnOnce(&Self)) -> Self
.tap() only in debug builds, and is erased in release builds.Source§fn tap_mut_dbg(self, func: impl FnOnce(&mut Self)) -> Self
fn tap_mut_dbg(self, func: impl FnOnce(&mut Self)) -> Self
.tap_mut() only in debug builds, and is erased in release
builds.Source§fn tap_borrow_dbg<B>(self, func: impl FnOnce(&B)) -> Self
fn tap_borrow_dbg<B>(self, func: impl FnOnce(&B)) -> Self
.tap_borrow() only in debug builds, and is erased in release
builds.Source§fn tap_borrow_mut_dbg<B>(self, func: impl FnOnce(&mut B)) -> Self
fn tap_borrow_mut_dbg<B>(self, func: impl FnOnce(&mut B)) -> Self
.tap_borrow_mut() only in debug builds, and is erased in release
builds.Source§fn tap_ref_dbg<R>(self, func: impl FnOnce(&R)) -> Self
fn tap_ref_dbg<R>(self, func: impl FnOnce(&R)) -> Self
.tap_ref() only in debug builds, and is erased in release
builds.Source§fn tap_ref_mut_dbg<R>(self, func: impl FnOnce(&mut R)) -> Self
fn tap_ref_mut_dbg<R>(self, func: impl FnOnce(&mut R)) -> Self
.tap_ref_mut() only in debug builds, and is erased in release
builds.Source§fn tap_deref_dbg<T>(self, func: impl FnOnce(&T)) -> Self
fn tap_deref_dbg<T>(self, func: impl FnOnce(&T)) -> Self
.tap_deref() only in debug builds, and is erased in release
builds.