[][src]Struct badgen::Opacity

pub struct Opacity<'a>(_);

Wrapper around a string opacity value.

Implementations

impl<'a> Opacity<'a>[src]

pub const fn raw(s: &'a str) -> Self[src]

A raw unchecked opacity value.

pub fn parse(s: &'a str) -> Option<Self>[src]

Parse an opacity value.

pub fn is_opaque(&self) -> bool[src]

Returns true if the value is completely opaque.

pub fn is_transparent(&self) -> bool[src]

Returns true if the value is completely transparent.

pub fn as_str(&'a self) -> &str[src]

Returns the opacity value.

pub fn fmt<W>(&self, w: W) -> Result where
    W: Write
[src]

Writes the opacity to a fmt::Write.

Trait Implementations

impl<'a> Clone for Opacity<'a>[src]

impl<'a> Copy for Opacity<'a>[src]

impl<'a> Debug for Opacity<'a>[src]

impl<'a> PartialEq<Opacity<'a>> for Opacity<'a>[src]

impl<'a> StructuralPartialEq for Opacity<'a>[src]

Auto Trait Implementations

impl<'a> RefUnwindSafe for Opacity<'a>

impl<'a> Send for Opacity<'a>

impl<'a> Sync for Opacity<'a>

impl<'a> Unpin for Opacity<'a>

impl<'a> UnwindSafe for Opacity<'a>

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.