Trait cvar::IProperty [] [src]

pub trait IProperty: INode {
    fn get(&self) -> String;
    fn set(&self, val: &str) -> Result<()InnerError>;
    fn reset(&self);
    fn default(&self) -> String;
    fn state(&self) -> PropState;
}

Property node interface.

Provides an object safe interface for properties, type erasing its implementation.

Required Methods

fn get(&self) -> String

Gets the value as a string.

fn set(&self, val: &str) -> Result<()InnerError>

Sets the value.

May fail with InnerError::ParseError if parsing the value yields an error.

May fail with InnerError::ChangeError if validating the value yields an error.

fn reset(&self)

Resets the value to its default.

fn default(&self) -> String

Gets the default value as a string.

fn state(&self) -> PropState

Returns the state of the property.

Trait Implementations

impl<'a> Debug for &'a IProperty
[src]

fn fmt(&self, f: &mut Formatter) -> Result

Formats the value using the given formatter.

Implementors