pub struct Store { /* private fields */ }Implementations§
Source§impl Store
impl Store
Sourcepub async fn open(state: &Path) -> Result<Self, String>
pub async fn open(state: &Path) -> Result<Self, String>
Open or create review-store.sqlite, separate from the local state.sqlite.
Sourcepub async fn add_token(
&self,
name: &TokenName,
scopes: &[Scope],
) -> Result<String, String>
pub async fn add_token( &self, name: &TokenName, scopes: &[Scope], ) -> Result<String, String>
Create a token; only its SHA-256 is stored, so the caller prints it once.
pub async fn tokens(&self) -> Result<Vec<Token>, String>
Trait Implementations§
Auto Trait Implementations§
impl Forget for Store
impl Freeze for Store
impl Move for Store
impl RefUnwindSafe for Storewhere
Sender<Message>: RefUnwindSafe,
impl Send for Store
impl Sync for Store
impl Unpin for Store
impl UnsafeUnpin for Storewhere
*mut Counter<Channel<Message>>: UnsafeUnpin,
*mut Counter<Channel<Message>>: UnsafeUnpin,
*mut Counter<Channel<Message>>: UnsafeUnpin,
impl UnwindSafe for Storewhere
Sender<Message>: UnwindSafe,
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