[][src]Enum xosd_rs::Command

pub enum Command {
    Percentage(u16),
    String(String),
    Slider(u16),
}

Various types that can be displayed with Xosd::display

You should not construct any of these variants manually. Instead use one of the constructors below.

Variants

Percentage(u16)

Used to display a percentage

String(String)

Used to display text

Slider(u16)

Used to display a slider

Implementations

impl Command[src]

pub fn percentage(percentage: u16) -> Result<Self>[src]

Construct the Command::Percentage variant

Errors

If precentage is greater than 100 or less than 1 return Error::OutOfRangePercentage

pub fn string<S>(string: S) -> Result<Self> where
    S: ToString
[src]

Construct the Command::String variant

Errors

This function never fails

pub fn slider(slider: u16) -> Result<Self>[src]

Construct the Command::Slider variant

Errors

If precentage is greater than 100 or less than 1 return Error::OutOfRangePercentage

Trait Implementations

impl Clone for Command[src]

impl Debug for Command[src]

impl Eq for Command[src]

impl Hash for Command[src]

impl Ord for Command[src]

impl PartialEq<Command> for Command[src]

impl PartialOrd<Command> for Command[src]

impl StructuralEq for Command[src]

impl StructuralPartialEq for Command[src]

Auto Trait Implementations

impl RefUnwindSafe for Command

impl Send for Command

impl Sync for Command

impl Unpin for Command

impl UnwindSafe for Command

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.