pub enum FunctionKind {
Constructor,
Function,
Fallback,
Receive,
Modifier,
}Expand description
A kind of function.
Variants§
Implementations§
Source§impl FunctionKind
impl FunctionKind
Sourcepub const fn is_constructor(&self) -> bool
pub const fn is_constructor(&self) -> bool
Returns true if the enum is FunctionKind::Constructor otherwise false
Sourcepub const fn is_function(&self) -> bool
pub const fn is_function(&self) -> bool
Returns true if the enum is FunctionKind::Function otherwise false
Sourcepub const fn is_fallback(&self) -> bool
pub const fn is_fallback(&self) -> bool
Returns true if the enum is FunctionKind::Fallback otherwise false
Sourcepub const fn is_receive(&self) -> bool
pub const fn is_receive(&self) -> bool
Returns true if the enum is FunctionKind::Receive otherwise false
Sourcepub const fn is_modifier(&self) -> bool
pub const fn is_modifier(&self) -> bool
Returns true if the enum is FunctionKind::Modifier otherwise false
Source§impl FunctionKind
impl FunctionKind
Sourcepub const fn to_str(self) -> &'static str
pub const fn to_str(self) -> &'static str
Returns the string representation of the function kind.
Sourcepub fn allowed_in_global(&self) -> bool
pub fn allowed_in_global(&self) -> bool
Returns true if the function is allowed in global scope.
Sourcepub fn is_ordinary(&self) -> bool
pub fn is_ordinary(&self) -> bool
Returns true if the function is an ordinary function.
Trait Implementations§
Source§impl Clone for FunctionKind
impl Clone for FunctionKind
Source§fn clone(&self) -> FunctionKind
fn clone(&self) -> FunctionKind
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for FunctionKind
impl Debug for FunctionKind
Source§impl Display for FunctionKind
impl Display for FunctionKind
Source§impl Hash for FunctionKind
impl Hash for FunctionKind
Source§impl PartialEq for FunctionKind
impl PartialEq for FunctionKind
impl Copy for FunctionKind
impl Eq for FunctionKind
impl StructuralPartialEq for FunctionKind
Auto Trait Implementations§
impl Freeze for FunctionKind
impl RefUnwindSafe for FunctionKind
impl Send for FunctionKind
impl Sync for FunctionKind
impl Unpin for FunctionKind
impl UnwindSafe for FunctionKind
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T, R> CollectAndApply<T, R> for T
impl<T, R> CollectAndApply<T, R> for T
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
fn equivalent(&self, key: &K) -> bool
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
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> ⓘ
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> ⓘ
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 moreSource§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<Q> ToOwnedEquivalent<<Q as ToOwned>::Owned> for Q
impl<Q> ToOwnedEquivalent<<Q as ToOwned>::Owned> for Q
fn to_owned_equivalent(&self) -> <Q as ToOwned>::Owned
Source§impl<T> WithSubscriber for T
impl<T> WithSubscriber for T
Source§fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
Source§fn with_current_subscriber(self) -> WithDispatch<Self>
fn with_current_subscriber(self) -> WithDispatch<Self>
Layout§
Note: Most layout information is completely unstable and may even differ between compilations. The only exception is types with certain repr(...) attributes. Please see the Rust Reference's “Type Layout” chapter for details on type layout guarantees.
Size: 1 byte
Size for each variant:
Constructor: 0 bytesFunction: 0 bytesFallback: 0 bytesReceive: 0 bytesModifier: 0 bytes