Trait cvar::IProperty [−][src]
Property node interface.
Provides an object safe interface for properties, type erasing its implementation.
Required methods
fn get(&self) -> String
[src]
Gets the value as a string.
fn set(
&mut self,
val: &str
) -> Result<(), Box<dyn StdError + Send + Sync + 'static>>
[src]
&mut self,
val: &str
) -> Result<(), Box<dyn StdError + Send + Sync + 'static>>
Sets the value.
fn reset(&mut self)
[src]
Resets the value to its default.
If this operation fails (for eg. read-only properties), it does so silently.
fn default(&self) -> String
[src]
Gets the default value as a string.
fn state(&self) -> PropState
[src]
Returns the state of the property.
Provided methods
fn flags(&self) -> u32
[src]
Returns the flags associated with the property.
The meaning of this value is defined by the caller.
fn values(&self) -> Option<&[&str]>
[src]
Returns a list of valid value strings for this property.
None if the question is not relevant, eg. string or number nodes.
Trait Implementations
Implementors
impl<'a, T> IProperty for ClampedProp<'a, T> where
T: FromStr + ToString + Clone + PartialEq + PartialOrd,
T::Err: StdError + Send + Sync + 'static,
[src]
T: FromStr + ToString + Clone + PartialEq + PartialOrd,
T::Err: StdError + Send + Sync + 'static,
fn get(&self) -> String
[src]
fn set(
&mut self,
val: &str
) -> Result<(), Box<dyn StdError + Send + Sync + 'static>>
[src]
&mut self,
val: &str
) -> Result<(), Box<dyn StdError + Send + Sync + 'static>>
fn reset(&mut self)
[src]
fn default(&self) -> String
[src]
fn state(&self) -> PropState
[src]
impl<'a, T> IProperty for Property<'a, T> where
T: FromStr + ToString + Clone + PartialEq,
T::Err: StdError + Send + Sync + 'static,
[src]
T: FromStr + ToString + Clone + PartialEq,
T::Err: StdError + Send + Sync + 'static,
fn get(&self) -> String
[src]
fn set(
&mut self,
val: &str
) -> Result<(), Box<dyn StdError + Send + Sync + 'static>>
[src]
&mut self,
val: &str
) -> Result<(), Box<dyn StdError + Send + Sync + 'static>>
fn reset(&mut self)
[src]
fn default(&self) -> String
[src]
fn state(&self) -> PropState
[src]
impl<'a, T: ToString + PartialEq> IProperty for ReadOnlyProp<'a, T>
[src]
fn get(&self) -> String
[src]
fn set(
&mut self,
_val: &str
) -> Result<(), Box<dyn StdError + Send + Sync + 'static>>
[src]
&mut self,
_val: &str
) -> Result<(), Box<dyn StdError + Send + Sync + 'static>>
fn reset(&mut self)
[src]
fn default(&self) -> String
[src]
fn state(&self) -> PropState
[src]
impl<T> IProperty for OwnedProp<T> where
T: FromStr + ToString + Clone + PartialEq,
T::Err: StdError + Send + Sync + 'static,
[src]
T: FromStr + ToString + Clone + PartialEq,
T::Err: StdError + Send + Sync + 'static,