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,
) -> Option<T>;
}
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,
) -> Option<T>
fn get_property<T: MappableType + Default + Copy>( &self, property: mpr_prop, ) -> Option<T>
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 None
.
Object Safety§
This trait is not object safe.