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.