pub struct GrantStore { /* private fields */ }Expand description
The user grant store.
Implementations§
Source§impl GrantStore
impl GrantStore
Sourcepub fn default_location() -> Result<PathBuf, String>
pub fn default_location() -> Result<PathBuf, String>
The store beside the user config. Derived from the XDG base directory only, so no repository configuration can relocate it.
§Errors
No absolute config base directory: a store never falls back to the working directory.
Sourcepub fn open_default() -> Result<Self, String>
pub fn open_default() -> Result<Self, String>
§Errors
pub fn at(dir: PathBuf) -> Self
pub fn dir(&self) -> &Path
Sourcepub fn load(&self, rps: &[RelyingParty]) -> LoadReport
pub fn load(&self, rps: &[RelyingParty]) -> LoadReport
Load and verify every grant, within the store bounds.
Sourcepub fn add(
&self,
header: &str,
rps: &[RelyingParty],
) -> Result<AddOutcome, StoreError>
pub fn add( &self, header: &str, rps: &[RelyingParty], ) -> Result<AddOutcome, StoreError>
Verify header and store it. Adding a grant that is already stored
(same grant id, §3.4) changes nothing.
§Errors
The verifier’s rule, an unsafe store directory, a full store, or I/O.
Trait Implementations§
Source§impl Clone for GrantStore
impl Clone for GrantStore
Auto Trait Implementations§
impl Freeze for GrantStore
impl RefUnwindSafe for GrantStore
impl Send for GrantStore
impl Sync for GrantStore
impl Unpin for GrantStore
impl UnsafeUnpin for GrantStore
impl UnwindSafe for GrantStore
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> FutureExt for T
impl<T> FutureExt for T
Source§fn with_context(self, otel_cx: Context) -> WithContext<Self> ⓘ
fn with_context(self, otel_cx: Context) -> WithContext<Self> ⓘ
Source§fn with_current_context(self) -> WithContext<Self> ⓘ
fn with_current_context(self) -> WithContext<Self> ⓘ
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