Struct State

Source
pub struct State<U: Ui, _T: Clone = (), D: Display + Send + Clone = String, W: 'static = ()> { /* private fields */ }
Expand description

A part of the StatusLine

This can either be a static part, like Text, impl Display type, or it can be a reader of the File and its structs, or it can update independently.

Implementations§

Source§

impl<U, _T, D, W> State<U, _T, D, W>
where U: Ui, _T: Send + Clone + 'static, D: Display + Send + Clone + 'static, W: 'static,

Source

pub fn fns( self, ) -> (Box<dyn FnMut(&mut Builder, &mut Reader<U>) + Send>, Box<dyn Fn() -> bool + Send + Sync>)

Trait Implementations§

Source§

impl<U: Ui> From<AlignCenter> for State<U, AlignCenter>

Source§

fn from(_: AlignCenter) -> Self

Converts to this type from the input type.
Source§

impl<U: Ui> From<AlignLeft> for State<U, AlignLeft>

Source§

fn from(_: AlignLeft) -> Self

Converts to this type from the input type.
Source§

impl<U: Ui> From<AlignRight> for State<U, AlignRight>

Source§

fn from(_: AlignRight) -> Self

Converts to this type from the input type.
Source§

impl<D: Display + Send + Clone + 'static, U: Ui> From<D> for State<U, D, D>

Source§

fn from(value: D) -> Self

Converts to this type from the input type.
Source§

impl<U: Ui> From<Ghost> for State<U, Ghost>

Source§

fn from(value: Ghost) -> Self

Converts to this type from the input type.
Source§

impl<U: Ui> From<Spacer> for State<U, Spacer>

Source§

fn from(_: Spacer) -> Self

Converts to this type from the input type.
Source§

impl<U: Ui> From<Text> for State<U, Text>

Source§

fn from(value: Text) -> Self

Converts to this type from the input type.

Auto Trait Implementations§

§

impl<U, _T, D, W> Freeze for State<U, _T, D, W>
where D: Freeze,

§

impl<U, _T = (), D = String, W = ()> !RefUnwindSafe for State<U, _T, D, W>

§

impl<U, _T, D, W> Send for State<U, _T, D, W>
where _T: Send,

§

impl<U, _T = (), D = String, W = ()> !Sync for State<U, _T, D, W>

§

impl<U, _T, D, W> Unpin for State<U, _T, D, W>
where _T: Unpin, D: Unpin,

§

impl<U, _T = (), D = String, W = ()> !UnwindSafe for State<U, _T, D, W>

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<!> for T

Source§

fn from(t: !) -> T

Converts to this type from the input type.
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

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

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.