[−][src]Struct license::Permissions
The permissions of the license.
Examples
let mit = license::from_id_ext("MIT").unwrap(); let perm = mit.permissions(); assert!(perm.private_use() && perm.commercial_use());
Implementations
impl Permissions
[src]
pub const fn commercial_use(self) -> bool
[src]
May be used for commercial purposes.
pub const fn distribution(self) -> bool
[src]
May be distributed.
pub const fn modification(self) -> bool
[src]
May be modified.
pub const fn patent_rights(self) -> bool
[src]
Provides an express grant of patent rights from contributors.
pub const fn private_use(self) -> bool
[src]
May be used for private purposes.
Trait Implementations
impl Clone for Permissions
[src]
fn clone(&self) -> Permissions
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl Copy for Permissions
[src]
impl Debug for Permissions
[src]
impl Default for Permissions
[src]
fn default() -> Permissions
[src]
impl Display for Permissions
[src]
impl Eq for Permissions
[src]
impl Hash for Permissions
[src]
fn hash<__H: Hasher>(&self, state: &mut __H)
[src]
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
1.3.0[src]
H: Hasher,
impl Ord for Permissions
[src]
fn cmp(&self, other: &Permissions) -> Ordering
[src]
#[must_use]fn max(self, other: Self) -> Self
1.21.0[src]
#[must_use]fn min(self, other: Self) -> Self
1.21.0[src]
#[must_use]fn clamp(self, min: Self, max: Self) -> Self
[src]
impl PartialEq<Permissions> for Permissions
[src]
fn eq(&self, other: &Permissions) -> bool
[src]
fn ne(&self, other: &Permissions) -> bool
[src]
impl PartialOrd<Permissions> for Permissions
[src]
fn partial_cmp(&self, other: &Permissions) -> Option<Ordering>
[src]
fn lt(&self, other: &Permissions) -> bool
[src]
fn le(&self, other: &Permissions) -> bool
[src]
fn gt(&self, other: &Permissions) -> bool
[src]
fn ge(&self, other: &Permissions) -> bool
[src]
impl StructuralEq for Permissions
[src]
impl StructuralPartialEq for Permissions
[src]
Auto Trait Implementations
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,