pub struct MemoryClientStore { /* private fields */ }Expand description
Clients held in this process’s memory: right for tests and a development server, wrong for anything that restarts.
Implementations§
Source§impl MemoryClientStore
impl MemoryClientStore
pub fn new() -> MemoryClientStore
Sourcepub fn register(&self, client: Client) -> Result<()>
pub fn register(&self, client: Client) -> Result<()>
Add a client, refusing one that could not be safely authorised.
Sourcepub fn with(self, client: Client) -> MemoryClientStore
pub fn with(self, client: Client) -> MemoryClientStore
Add a client while building the store: MemoryClientStore::new().with(client).
Panics on an invalid client, because this form is used where there is no
Result to return — a main.rs line or a test — and a client with an
unusable redirect URI is a mistake to fix, not a condition to handle.
pub fn forget(&self, id: &str)
pub fn len(&self) -> usize
pub fn is_empty(&self) -> bool
Trait Implementations§
Source§impl ClientStore for MemoryClientStore
impl ClientStore for MemoryClientStore
Auto Trait Implementations§
impl !Freeze for MemoryClientStore
impl RefUnwindSafe for MemoryClientStore
impl Send for MemoryClientStore
impl Sync for MemoryClientStore
impl Unpin for MemoryClientStore
impl UnsafeUnpin for MemoryClientStore
impl UnwindSafe for MemoryClientStore
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