[−][src]Trait webthing::property::Property
High-level Property trait.
Required methods
fn set_href_prefix(&mut self, prefix: String)
Set the prefix of any hrefs associated with this property.
fn get_href(&self) -> String
Get the href of this property.
fn get_value(&self) -> Value
Get the current property value.
fn set_value(&mut self, value: Value) -> Result<(), &'static str>
Set the current value of the property with the value forwarder.
fn set_cached_value(&mut self, value: Value) -> Result<(), &'static str>
Set the cached value of the property.
fn get_name(&self) -> String
Get the name of this property.
fn get_metadata(&self) -> Map<String, Value>
Get the metadata associated with this property.
Provided methods
fn validate_value(&self, value: &Value) -> Result<(), &'static str>
Validate new property value before setting it.
Returns a result indicating validity.
fn as_property_description(&self) -> Map<String, Value>
Get the property description.
Returns a JSON value describing the property.
Implementors
impl Property for BaseProperty
[src]
fn set_href_prefix(&mut self, prefix: String)
[src]
Set the prefix of any hrefs associated with this property.
fn get_href(&self) -> String
[src]
Get the href of this property.
fn get_value(&self) -> Value
[src]
Get the current property value.
fn set_value(&mut self, value: Value) -> Result<(), &'static str>
[src]
Set the current value of the property.
fn set_cached_value(&mut self, value: Value) -> Result<(), &'static str>
[src]
Set the cached value of the property.
fn get_name(&self) -> String
[src]
Get the name of this property.
fn get_metadata(&self) -> Map<String, Value>
[src]
Get the metadata associated with this property.