[−][src]Struct pushrod::widget::config::Configurable
Structure containing the configuration HashMap.
Methods
impl Configurable[src]
pub fn new() -> Self[src]
Constructor.
pub fn set(&mut self, config: u8, config_value: Config)[src]
Setter master method - use convenience methods instead.
pub fn remove(&mut self, config: u8)[src]
Removes a key from the configs.
pub fn contains(&self, config: u8) -> bool[src]
Indicates whether or not a key has been configured.
pub fn get(&self, config: u8) -> Option<&Config>[src]
Getter master method - use convenience methods instead.
pub fn set_point(&mut self, config: u8, x: i32, y: i32)[src]
Sets a point for a configuration key.
pub fn set_size(&mut self, config: u8, w: i32, h: i32)[src]
Sets a size for a configuration key.
pub fn set_color(&mut self, config: u8, color: Color)[src]
Sets a color for a configuration key.
pub fn set_numeric(&mut self, config: u8, value: u64)[src]
Sets a numeric value for a configuration key.
pub fn set_text(&mut self, config: u8, text: String)[src]
Sets a text value for a configuration key.
pub fn set_toggle(&mut self, config: u8, flag: bool)[src]
Sets a toggle for a configuration key.
pub fn get_point(&self, config: u8) -> Point[src]
Retrieves a Point for a configuration key. Returns Point::default if not set.
pub fn get_size(&self, config: u8) -> Size[src]
Retrieves a Size for a configuration key. Returns a Size::default if not set.
pub fn get_color(&self, config: u8) -> Color[src]
Retrieves a Color for a configuration key. Returns white if not set.
pub fn get_numeric(&self, config: u8) -> u64[src]
Retrieves a numeric value for a configuration key. Returns 0 if not set.
pub fn get_text(&self, config: u8) -> String[src]
Retrieves text for a configuration key. Returns a blank string if not set.
pub fn get_toggle(&self, config: u8) -> bool[src]
Retrieves a boolean toggle for a configuration key. Returns false if not set.
Auto Trait Implementations
impl Send for Configurable
impl Sync for Configurable
Blanket Implementations
impl<T> From<T> for T[src]
impl<T, U> Into<U> for T where
U: From<T>, [src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>, [src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>, [src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>[src]
impl<T> Borrow<T> for T where
T: ?Sized, [src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized, [src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T[src]
impl<T> Any for T where
T: 'static + ?Sized, [src]
T: 'static + ?Sized,
impl<T> Erased for T
impl<T> SetParameter for T
fn set<T>(&mut self, value: T) -> <T as Parameter<Self>>::Result where
T: Parameter<Self>,
T: Parameter<Self>,
Sets value as a parameter of self.