pub struct LicenseWorker { /* private fields */ }Expand description
Implementations§
Source§impl LicenseWorker
impl LicenseWorker
Sourcepub fn new(config: LicenseConfig, provider: Arc<dyn LicenseProvider>) -> Self
pub fn new(config: LicenseConfig, provider: Arc<dyn LicenseProvider>) -> Self
Load persisted state and, if a key is stored, kick off a validation immediately.
Sourcepub fn keygen(config: LicenseConfig) -> Self
pub fn keygen(config: LicenseConfig) -> Self
Convenience: wire a KeygenProvider from the config.
pub fn status(&self) -> LicenseStatus
pub fn unlocked(&self) -> bool
pub fn log(&self) -> &[String]
Sourcepub fn last_message(&self) -> Option<&str>
pub fn last_message(&self) -> Option<&str>
The most recent log line, if any.
Sourcepub fn is_checking(&self) -> bool
pub fn is_checking(&self) -> bool
Is a validation currently in flight?
Sourcepub fn set_key(&mut self, key: impl Into<String>)
pub fn set_key(&mut self, key: impl Into<String>)
Replace the key (e.g. from a text field or a paste).
Auto Trait Implementations§
impl !RefUnwindSafe for LicenseWorker
impl !Sync for LicenseWorker
impl !UnwindSafe for LicenseWorker
impl Forget for LicenseWorker
impl Freeze for LicenseWorker
impl Send for LicenseWorker
impl Unpin for LicenseWorker
impl UnsafeUnpin for LicenseWorker
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