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