pub struct Function { /* private fields */ }Expand description
Metadata about a function declared by an interface.
Provides information needed during linking to wire up cross-plugin dispatch.
Implementations§
Source§impl Function
impl Function
Sourcepub fn new(kind: FunctionKind, return_kind: ReturnKind) -> Self
pub fn new(kind: FunctionKind, return_kind: ReturnKind) -> Self
Creates a new function metadata entry.
Sourcepub fn return_kind(&self) -> ReturnKind
pub fn return_kind(&self) -> ReturnKind
The function’s return kind for dispatch handling.
Sourcepub fn kind(&self) -> FunctionKind
pub fn kind(&self) -> FunctionKind
Whether this function is freestanding or a resource method.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Function
impl RefUnwindSafe for Function
impl Send for Function
impl Sync for Function
impl Unpin for Function
impl UnsafeUnpin for Function
impl UnwindSafe for Function
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> 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