pub struct MethodInfo {
pub name: String,
pub signature: String,
pub docs: Option<String>,
pub is_required: bool,
pub is_async: bool,
pub is_unsafe: bool,
pub generics: Vec<String>,
pub return_type: Option<String>,
pub arguments: Vec<ParameterInfo>,
}Expand description
A method declared by a trait.
Fields§
§name: StringName of the method.
signature: StringFull method signature as written in source, e.g.
"fn fit(&mut self, x: &Array2<f64>) -> Result<()>".
docs: Option<String>Rustdoc documentation attached to the method, if any.
is_required: boolWhether the method has no default implementation (must be implemented by every conforming type).
is_async: boolWhether the method is declared async.
is_unsafe: boolWhether the method is declared unsafe.
generics: Vec<String>Generic parameters declared on the method itself (independent of the trait’s own generics).
return_type: Option<String>Return type of the method, if it returns something other than ().
arguments: Vec<ParameterInfo>Parameters accepted by the method (excluding self).
Trait Implementations§
Source§impl Clone for MethodInfo
impl Clone for MethodInfo
Source§fn clone(&self) -> MethodInfo
fn clone(&self) -> MethodInfo
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for MethodInfo
impl RefUnwindSafe for MethodInfo
impl Send for MethodInfo
impl Sync for MethodInfo
impl Unpin for MethodInfo
impl UnsafeUnpin for MethodInfo
impl UnwindSafe for MethodInfo
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more