[][src]Trait dbus_tree::MethodType

pub trait MethodType<D: DataType>: Sized + Default {
    type Method: ?Sized;
    type GetProp: ?Sized;
    type SetProp: ?Sized;
    fn call_getprop(
        _: &Self::GetProp,
        _: &mut IterAppend<'_>,
        _: &PropInfo<'_, Self, D>
    ) -> Result<(), MethodErr>;
fn call_setprop(
        _: &Self::SetProp,
        _: &mut Iter<'_>,
        _: &PropInfo<'_, Self, D>
    ) -> Result<(), MethodErr>;
fn call_method(
        _: &Self::Method,
        _: &MethodInfo<'_, Self, D>
    ) -> MethodResult;
fn make_getprop<H>(h: H) -> Box<Self::GetProp>
    where
        H: Fn(&mut IterAppend<'_>, &PropInfo<'_, Self, D>) -> Result<(), MethodErr> + Send + Sync + 'static
;
fn make_method<H>(h: H) -> Box<Self::Method>
    where
        H: Fn(&MethodInfo<'_, Self, D>) -> MethodResult + Send + Sync + 'static
; }

A helper trait used internally to make the tree generic over MTFn, MTFnMut and MTSync.

You should not need to call these methods directly, it's primarily for internal use.

Associated Types

type Method: ?Sized

For internal use.

type GetProp: ?Sized

For internal use.

type SetProp: ?Sized

For internal use.

Loading content...

Required methods

fn call_getprop(
    _: &Self::GetProp,
    _: &mut IterAppend<'_>,
    _: &PropInfo<'_, Self, D>
) -> Result<(), MethodErr>

For internal use.

fn call_setprop(
    _: &Self::SetProp,
    _: &mut Iter<'_>,
    _: &PropInfo<'_, Self, D>
) -> Result<(), MethodErr>

For internal use.

fn call_method(_: &Self::Method, _: &MethodInfo<'_, Self, D>) -> MethodResult

For internal use.

fn make_getprop<H>(h: H) -> Box<Self::GetProp> where
    H: Fn(&mut IterAppend<'_>, &PropInfo<'_, Self, D>) -> Result<(), MethodErr> + Send + Sync + 'static, 

For internal use.

fn make_method<H>(h: H) -> Box<Self::Method> where
    H: Fn(&MethodInfo<'_, Self, D>) -> MethodResult + Send + Sync + 'static, 

For internal use.

Loading content...

Implementors

impl<D: DataType> MethodType<D> for MTFn<D>[src]

type GetProp = dyn Fn(&mut IterAppend<'_>, &PropInfo<'_, Self, D>) -> Result<(), MethodErr>

type SetProp = dyn Fn(&mut Iter<'_>, &PropInfo<'_, Self, D>) -> Result<(), MethodErr>

type Method = dyn Fn(&MethodInfo<'_, Self, D>) -> MethodResult

impl<D: DataType> MethodType<D> for MTFnMut<D>[src]

type GetProp = RefCell<dyn FnMut(&mut IterAppend<'_>, &PropInfo<'_, Self, D>) -> Result<(), MethodErr>>

type SetProp = RefCell<dyn FnMut(&mut Iter<'_>, &PropInfo<'_, Self, D>) -> Result<(), MethodErr>>

type Method = RefCell<dyn FnMut(&MethodInfo<'_, Self, D>) -> MethodResult>

impl<D: DataType> MethodType<D> for MTSync<D>[src]

type GetProp = dyn Fn(&mut IterAppend<'_>, &PropInfo<'_, Self, D>) -> Result<(), MethodErr> + Send + Sync + 'static

type SetProp = dyn Fn(&mut Iter<'_>, &PropInfo<'_, Self, D>) -> Result<(), MethodErr> + Send + Sync + 'static

type Method = dyn Fn(&MethodInfo<'_, Self, D>) -> MethodResult + Send + Sync + 'static

Loading content...