pub struct FunctionReflection<T> {
pub name: &'static str,
pub function: fn(Box<dyn Any>) -> Box<dyn Any>,
pub documentation: Option<&'static str>,
pub _type: PhantomData<T>,
}Expand description
Reification of a function that has the signature fn some_fn(T) -> T. Provides the name,
documentation, and ability to invoke the function.
Fields§
§name: &'static strThe name of the function
function: fn(Box<dyn Any>) -> Box<dyn Any>The method
documentation: Option<&'static str>Documentation for the function
_type: PhantomData<T>PhantomData for the type of the argument and result
Implementations§
Source§impl<T: 'static> FunctionReflection<T>
impl<T: 'static> FunctionReflection<T>
Trait Implementations§
Source§impl<T: Clone> Clone for FunctionReflection<T>
impl<T: Clone> Clone for FunctionReflection<T>
Source§fn clone(&self) -> FunctionReflection<T>
fn clone(&self) -> FunctionReflection<T>
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 moreimpl<T: Copy> Copy for FunctionReflection<T>
Auto Trait Implementations§
impl<T> Freeze for FunctionReflection<T>
impl<T> RefUnwindSafe for FunctionReflection<T>where
T: RefUnwindSafe,
impl<T> Send for FunctionReflection<T>where
T: Send,
impl<T> Sync for FunctionReflection<T>where
T: Sync,
impl<T> Unpin for FunctionReflection<T>where
T: Unpin,
impl<T> UnsafeUnpin for FunctionReflection<T>
impl<T> UnwindSafe for FunctionReflection<T>where
T: UnwindSafe,
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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