pub enum LicensePlan {
None,
Free,
Supporter,
Pro,
Premium,
Lifetime,
Enterprise,
}Expand description
License plan tiers.
Each plan has different feature access. Only Pro, Premium, Lifetime, and Enterprise plans include verification capabilities.
Variants§
None
No license or unknown plan.
Free
Free tier, no verification.
Supporter
Supporter tier, no verification.
Pro
Pro tier, includes verification.
Premium
Premium tier, includes verification.
Lifetime
Lifetime tier, includes verification.
Enterprise
Enterprise tier, includes verification.
Implementations§
Source§impl LicensePlan
impl LicensePlan
Sourcepub fn can_verify(&self) -> bool
pub fn can_verify(&self) -> bool
Check if this plan includes verification access.
Returns true for Pro, Premium, Lifetime, and Enterprise plans.
§Examples
use logicaffeine_verify::LicensePlan;
assert!(!LicensePlan::Free.can_verify());
assert!(LicensePlan::Pro.can_verify());Sourcepub fn from_str(s: &str) -> Self
pub fn from_str(s: &str) -> Self
Parse a plan from a string.
Returns LicensePlan::None for unrecognized strings.
§Examples
use logicaffeine_verify::LicensePlan;
assert_eq!(LicensePlan::from_str("pro"), LicensePlan::Pro);
assert_eq!(LicensePlan::from_str("PRO"), LicensePlan::Pro);
assert_eq!(LicensePlan::from_str("unknown"), LicensePlan::None);Trait Implementations§
Source§impl Clone for LicensePlan
impl Clone for LicensePlan
Source§fn clone(&self) -> LicensePlan
fn clone(&self) -> LicensePlan
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for LicensePlan
impl Debug for LicensePlan
Source§impl<'de> Deserialize<'de> for LicensePlan
impl<'de> Deserialize<'de> for LicensePlan
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
Source§impl Display for LicensePlan
impl Display for LicensePlan
Source§impl PartialEq for LicensePlan
impl PartialEq for LicensePlan
Source§fn eq(&self, other: &LicensePlan) -> bool
fn eq(&self, other: &LicensePlan) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl Serialize for LicensePlan
impl Serialize for LicensePlan
impl Copy for LicensePlan
impl Eq for LicensePlan
impl StructuralPartialEq for LicensePlan
Auto Trait Implementations§
impl Freeze for LicensePlan
impl RefUnwindSafe for LicensePlan
impl Send for LicensePlan
impl Sync for LicensePlan
impl Unpin for LicensePlan
impl UnsafeUnpin for LicensePlan
impl UnwindSafe for LicensePlan
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