Trait libmapper_rs::object::MapperObject
source · pub trait MapperObject {
// Required methods
fn get_type(&self) -> mpr_type;
fn set_property<T: MappableType>(&self, property: mpr_prop, value: T);
fn set_property_str(&self, property: mpr_prop, value: &str);
fn get_property<T: MappableType + Default + Copy>(
&self,
property: mpr_prop,
) -> Result<T, PropertyError>;
fn get_property_str(
&self,
property: mpr_prop,
) -> Result<String, PropertyError>;
}
Required Methods§
sourcefn set_property<T: MappableType>(&self, property: mpr_prop, value: T)
fn set_property<T: MappableType>(&self, property: mpr_prop, value: T)
Set a property on this object to a numerical value
sourcefn set_property_str(&self, property: mpr_prop, value: &str)
fn set_property_str(&self, property: mpr_prop, value: &str)
Set a property on this object to a string value
sourcefn get_property<T: MappableType + Default + Copy>(
&self,
property: mpr_prop,
) -> Result<T, PropertyError>
fn get_property<T: MappableType + Default + Copy>( &self, property: mpr_prop, ) -> Result<T, PropertyError>
Get the value of a property by it’s key from this object. If the property does not exist, or if the type is not matched, this function will return an error.
sourcefn get_property_str(&self, property: mpr_prop) -> Result<String, PropertyError>
fn get_property_str(&self, property: mpr_prop) -> Result<String, PropertyError>
Get the value of a string property by it’s key from this object. If the property does not exist, or if the type is not matched, this function will return an error.
Object Safety§
This trait is not object safe.