pub trait MethodType<D: DataType>: Sized + Default {
type Method: ?Sized;
type GetProp: ?Sized;
type SetProp: ?Sized;
// Required methods
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;
}
Expand description
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.
Required Associated Types§
Required Methods§
Sourcefn call_getprop(
_: &Self::GetProp,
_: &mut IterAppend<'_>,
_: &PropInfo<'_, Self, D>,
) -> Result<(), MethodErr>
fn call_getprop( _: &Self::GetProp, _: &mut IterAppend<'_>, _: &PropInfo<'_, Self, D>, ) -> Result<(), MethodErr>
For internal use.
Sourcefn call_setprop(
_: &Self::SetProp,
_: &mut Iter<'_>,
_: &PropInfo<'_, Self, D>,
) -> Result<(), MethodErr>
fn call_setprop( _: &Self::SetProp, _: &mut Iter<'_>, _: &PropInfo<'_, Self, D>, ) -> Result<(), MethodErr>
For internal use.
Sourcefn call_method(_: &Self::Method, _: &MethodInfo<'_, Self, D>) -> MethodResult
fn call_method(_: &Self::Method, _: &MethodInfo<'_, Self, D>) -> MethodResult
For internal use.
Sourcefn make_getprop<H>(h: H) -> Box<Self::GetProp>
fn make_getprop<H>(h: H) -> Box<Self::GetProp>
For internal use.
Sourcefn make_method<H>(h: H) -> Box<Self::Method>
fn make_method<H>(h: H) -> Box<Self::Method>
For internal use.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.