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§

source

fn get_type(&self) -> mpr_type

Get the mpr_type representing this object

source

fn set_property<T: MappableType>(&self, property: mpr_prop, value: T)

Set a property on this object to a numerical value

source

fn set_property_str(&self, property: mpr_prop, value: &str)

Set a property on this object to a string value

source

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.

Implementors§

source§

impl<A> MapperObject for A
where A: AsMprObject,