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 Freeze 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§
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