CellSetting

Struct CellSetting 

Source
pub struct CellSetting<T>(/* private fields */);
Expand description

A setting implemented using Cell

The capability of a Cell is to allow interior mutability. This is exactly the behavior needed to implement a setting trat object for integers of float numbers.

Trait Implementations§

Source§

impl<T: Default> Default for CellSetting<T>

Source§

fn default() -> CellSetting<T>

Returns the “default value” for a type. Read more
Source§

impl<T: Copy + FromStr> Setting for CellSetting<T>
where <T as FromStr>::Err: Debug,

Source§

type Item = T

Source§

fn set(&self, value: Self::Item)

Set the value of the setting Read more
Source§

fn get(&self) -> Self::Item

Get the value of the setting into a string slice
Source§

fn set_string(&self, value: &str)

Set the value of the setting obtained from string slice Read more
Source§

fn is_valid(&self, _value: &str) -> bool

Check if a certain string represented setting value meets the type spec of the setting. Read more

Auto Trait Implementations§

§

impl<T> !Freeze for CellSetting<T>

§

impl<T> !RefUnwindSafe for CellSetting<T>

§

impl<T> Send for CellSetting<T>
where T: Send,

§

impl<T> !Sync for CellSetting<T>

§

impl<T> Unpin for CellSetting<T>
where T: Unpin,

§

impl<T> UnwindSafe for CellSetting<T>
where T: UnwindSafe,

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<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.