[][src]Struct pushrod::widget::config::Configurable

pub struct Configurable { /* fields omitted */ }

This structure is used for the configuration store of Widget settings. It contains its own structure internally, so all that is used inside extended Widget objects is a simple instantiation of a new Configurable object as part of your extension.

Methods

impl Configurable[src]

Implementation of the Configurable object. Contains methods to extend the HashMap that is used for underlying storage.

pub fn new() -> Self[src]

Creates a new instance of this object.

pub fn set(&mut self, key: ConfigKey, value: WidgetConfig)[src]

Sets a configuration key by its ConfigKey ID, assigning a new WidgetConfig value to that key.

pub fn get(&self, key: ConfigKey) -> Option<&WidgetConfig>[src]

Retrieves an Option<&WidgetConfig> for the key specified. If the key does not exist, a None is returned.

pub fn remove(&mut self, key: ConfigKey)[src]

Removes the value for the specified key, if one exists.

pub fn contains_key(&self, key: ConfigKey) -> bool[src]

Indicates whether or not a Configurable store contains a value for the specified key. Returns true if one is stored, false otherwise.

Auto Trait Implementations

Blanket Implementations

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

impl<T> From for T[src]

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

type Error = !

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

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

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

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

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

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

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

impl<T> SetParameter for T

fn set<T>(&mut self, value: T) -> <T as Parameter<Self>>::Result where
    T: Parameter<Self>, 

Sets value as a parameter of self.

impl<T> Erased for T