pub struct License {
pub id: LicenseId,
pub tier: LicenseTier,
pub domains: HashSet<Domain>,
pub features: HashSet<String>,
pub gpu_native: bool,
pub expires_at: Option<DateTime<Utc>>,
pub max_kernels: Option<usize>,
pub holder: String,
}Expand description
License configuration.
Fields§
§id: LicenseIdLicense identifier.
tier: LicenseTierLicense tier.
domains: HashSet<Domain>Licensed domains.
features: HashSet<String>Licensed features (fine-grained).
gpu_native: boolWhether GPU-native kernels are enabled.
expires_at: Option<DateTime<Utc>>License expiry date (None = never expires).
max_kernels: Option<usize>Maximum concurrent kernels (None = unlimited).
holder: StringLicense holder name.
Implementations§
Source§impl License
impl License
Sourcepub fn development() -> Self
pub fn development() -> Self
Create a development license with all features enabled.
Sourcepub fn enterprise(
holder: impl Into<String>,
expires_at: Option<DateTime<Utc>>,
) -> Self
pub fn enterprise( holder: impl Into<String>, expires_at: Option<DateTime<Utc>>, ) -> Self
Create an enterprise license.
Sourcepub fn professional(
holder: impl Into<String>,
domains: HashSet<Domain>,
expires_at: Option<DateTime<Utc>>,
) -> Self
pub fn professional( holder: impl Into<String>, domains: HashSet<Domain>, expires_at: Option<DateTime<Utc>>, ) -> Self
Create a professional license.
Sourcepub fn with_domain(self, domain: Domain) -> Self
pub fn with_domain(self, domain: Domain) -> Self
Add a domain to the license.
Sourcepub fn with_feature(self, feature: impl Into<String>) -> Self
pub fn with_feature(self, feature: impl Into<String>) -> Self
Add a feature to the license.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for License
impl<'de> Deserialize<'de> for License
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for License
impl RefUnwindSafe for License
impl Send for License
impl Sync for License
impl Unpin for License
impl UnwindSafe for License
Blanket Implementations§
Source§impl<T> ArchivePointee for T
impl<T> ArchivePointee for T
Source§type ArchivedMetadata = ()
type ArchivedMetadata = ()
The archived version of the pointer metadata for this type.
Source§fn pointer_metadata(
_: &<T as ArchivePointee>::ArchivedMetadata,
) -> <T as Pointee>::Metadata
fn pointer_metadata( _: &<T as ArchivePointee>::ArchivedMetadata, ) -> <T as Pointee>::Metadata
Converts some archived metadata to the pointer metadata for itself.
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<F, W, T, D> Deserialize<With<T, W>, D> for F
impl<F, W, T, D> Deserialize<With<T, W>, D> for F
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> LayoutRaw for T
impl<T> LayoutRaw for T
Source§fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
Gets the layout of the type.