pub struct LicenseManager {
inner: RwLock<Inner>,
}
Expand description
The singleton license manager.
Fields§
§inner: RwLock<Inner>
Implementations§
source§impl LicenseManager
impl LicenseManager
sourcepub fn check_cpu_core_limit(
&self,
cpu_core_count: u64,
) -> Result<(), CpuCoreLimitExceeded>
pub fn check_cpu_core_limit( &self, cpu_core_count: u64, ) -> Result<(), CpuCoreLimitExceeded>
Check if the given CPU core count exceeds the limit as per the license key.
source§impl LicenseManager
impl LicenseManager
sourcepub fn refresh(&self, license_key: LicenseKeyRef<'_>)
pub fn refresh(&self, license_key: LicenseKeyRef<'_>)
Refresh the license with the given license key.
sourcepub fn license(&self) -> Result<License, LicenseKeyError>
pub fn license(&self) -> Result<License, LicenseKeyError>
Get the current license if it is valid.
Since the license can expire, the returned license should not be cached by the caller.
Prefer calling crate::Feature::check_available
to check the availability of a feature,
other than directly calling this method and checking the content of the license.
Auto Trait Implementations§
impl !Freeze for LicenseManager
impl RefUnwindSafe for LicenseManager
impl Send for LicenseManager
impl Sync for LicenseManager
impl Unpin for LicenseManager
impl UnwindSafe for LicenseManager
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
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T
in a tonic::Request