pub struct Preauth<'a>(/* private fields */);
Implementations§
Source§impl<'a> Preauth<'a>
impl<'a> Preauth<'a>
pub const fn new(preauth_key: &'a str) -> Self
pub fn set_auth( &self, storage: &mut dyn Storage, count: u64, ) -> Result<(), StdError>
pub fn get_auth(&self, storage: &dyn Storage) -> Result<u64, StdError>
pub fn add_auth(&self, storage: &mut dyn Storage) -> Result<(), StdError>
pub fn use_auth(&self, storage: &mut dyn Storage) -> Result<(), PreauthError>
Auto Trait Implementations§
impl<'a> Freeze for Preauth<'a>
impl<'a> RefUnwindSafe for Preauth<'a>
impl<'a> Send for Preauth<'a>
impl<'a> Sync for Preauth<'a>
impl<'a> Unpin for Preauth<'a>
impl<'a> UnwindSafe for Preauth<'a>
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