Trait dbus::tree::MethodType [−][src]
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.
Required Methods
fn call_getprop(
_: &Self::GetProp,
_: &mut IterAppend,
_: &PropInfo<Self, D>
) -> Result<(), MethodErr>
_: &Self::GetProp,
_: &mut IterAppend,
_: &PropInfo<Self, D>
) -> Result<(), MethodErr>
For internal use.
fn call_setprop(
_: &Self::SetProp,
_: &mut Iter,
_: &PropInfo<Self, D>
) -> Result<(), MethodErr>
_: &Self::SetProp,
_: &mut Iter,
_: &PropInfo<Self, D>
) -> Result<(), MethodErr>
For internal use.
fn call_method(_: &Self::Method, _: &MethodInfo<Self, D>) -> MethodResult
For internal use.
ⓘImportant traits for Box<R>
fn make_getprop<H>(h: H) -> Box<Self::GetProp> where
H: Fn(&mut IterAppend, &PropInfo<Self, D>) -> Result<(), MethodErr> + Send + Sync + 'static,
H: Fn(&mut IterAppend, &PropInfo<Self, D>) -> Result<(), MethodErr> + Send + Sync + 'static,
For internal use.
ⓘImportant traits for Box<R>
fn make_method<H>(h: H) -> Box<Self::Method> where
H: Fn(&MethodInfo<Self, D>) -> MethodResult + Send + Sync + 'static,
H: Fn(&MethodInfo<Self, D>) -> MethodResult + Send + Sync + 'static,
For internal use.
Implementors
impl<D: DataType> MethodType<D> for MTFn<D> type GetProp = Fn(&mut IterAppend, &PropInfo<Self, D>) -> Result<(), MethodErr>; type SetProp = Fn(&mut Iter, &PropInfo<Self, D>) -> Result<(), MethodErr>; type Method = Fn(&MethodInfo<Self, D>) -> MethodResult;
impl<D: DataType> MethodType<D> for MTFnMut<D> type GetProp = RefCell<FnMut(&mut IterAppend, &PropInfo<Self, D>) -> Result<(), MethodErr>>; type SetProp = RefCell<FnMut(&mut Iter, &PropInfo<Self, D>) -> Result<(), MethodErr>>; type Method = RefCell<FnMut(&MethodInfo<Self, D>) -> MethodResult>;
impl<D: DataType> MethodType<D> for MTSync<D> type GetProp = Fn(&mut IterAppend, &PropInfo<Self, D>) -> Result<(), MethodErr> + Send + Sync + 'static; type SetProp = Fn(&mut Iter, &PropInfo<Self, D>) -> Result<(), MethodErr> + Send + Sync + 'static; type Method = Fn(&MethodInfo<Self, D>) -> MethodResult + Send + Sync + 'static;