pub struct License(pub Option<(String, LicenseFunc)>);
Expand description
License shows license information
Tuple Fields
0: Option<(String, LicenseFunc)>
Implementations
sourceimpl License
impl License
sourcepub fn expr(&self) -> Option<String>
pub fn expr(&self) -> Option<String>
Returns (short) expression of license. If no license information(self is License(None)), returns None.
sourcepub fn expr_unwrap(&self) -> String
pub fn expr_unwrap(&self) -> String
Returns (short) expression of license. If no license information(self is License(None)), this function may panic.
sourcepub fn output(&self, cmd: &Command, ctx: &Context) -> Option<String>
pub fn output(&self, cmd: &Command, ctx: &Context) -> Option<String>
Returns (long) expression - detail of license.
sourcepub fn output_unwrap(&self, cmd: &Command, ctx: &Context) -> String
pub fn output_unwrap(&self, cmd: &Command, ctx: &Context) -> String
Returns (long) expression - detail of license. If self is License(None), this function may panic.
sourcepub fn output_fn(&self) -> Option<LicenseFunc>
pub fn output_fn(&self) -> Option<LicenseFunc>
Returns function which outputs (long) expression (or detail of license) with wrapping Option.
sourcepub fn output_fn_unwrap(&self) -> LicenseFunc
pub fn output_fn_unwrap(&self) -> LicenseFunc
Returns function of (long) expression (or detail of license). If self is License(None), this will panic.
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for License
impl Send for License
impl Sync for License
impl Unpin for License
impl UnwindSafe for License
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more