pub enum MethodReceiverKind {
None,
Ref,
RefMut,
Value,
ExternalPtrRef,
ExternalPtrRefMut,
ExternalPtrValue,
}Expand description
Receiver kind for an impl method, mirroring ReceiverKind in miniextendr-macros.
Mirror: miniextendr-macros/src/miniextendr_impl.rs — ReceiverKind.
Keep both in sync: if the macro relaxes one receiver kind, update this enum too.
Variants§
None
No self — static / associated function.
Ref
&self
RefMut
&mut self
Value
self (consuming)
ExternalPtrRef
self: &ExternalPtr<Self>
ExternalPtrRefMut
self: &mut ExternalPtr<Self>
ExternalPtrValue
self: ExternalPtr<Self>
Implementations§
Source§impl MethodReceiverKind
impl MethodReceiverKind
Sourcepub fn is_instance(self) -> bool
pub fn is_instance(self) -> bool
Returns true if this is an instance receiver (any form of self).
Mirrors ReceiverKind::is_instance in miniextendr-macros/src/miniextendr_impl.rs.
Value (consuming self) is excluded — the macro treats consuming-self methods
separately: they are either constructors (returns Self or #[miniextendr(constructor)])
or finalizers, not ordinary instance calls. Including Value here would produce a
false-positive for a vctrs method with #[miniextendr(constructor)] that consumes self.
Trait Implementations§
Source§impl Clone for MethodReceiverKind
impl Clone for MethodReceiverKind
Source§fn clone(&self) -> MethodReceiverKind
fn clone(&self) -> MethodReceiverKind
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for MethodReceiverKind
impl Debug for MethodReceiverKind
Source§impl Eq for MethodReceiverKind
impl Eq for MethodReceiverKind
Source§#[doc(hidden)]fn assert_fields_are_eq(&self)
#[doc(hidden)]fn assert_fields_are_eq(&self)
derive_eq_internals)1.0.0 (const: unstable) · Source§#[doc(hidden)]fn assert_receiver_is_total_eq(&self)
#[doc(hidden)]fn assert_receiver_is_total_eq(&self)
implementation detail of #[derive(Eq)]
Source§impl PartialEq for MethodReceiverKind
impl PartialEq for MethodReceiverKind
Source§fn eq(&self, other: &MethodReceiverKind) -> bool
fn eq(&self, other: &MethodReceiverKind) -> bool
self and other values to be equal, and is used by ==.impl Copy for MethodReceiverKind
impl StructuralPartialEq for MethodReceiverKind
impl TrivialClone for MethodReceiverKind
Auto Trait Implementations§
impl Freeze for MethodReceiverKind
impl RefUnwindSafe for MethodReceiverKind
impl Send for MethodReceiverKind
impl Sync for MethodReceiverKind
impl Unpin for MethodReceiverKind
impl UnsafeUnpin for MethodReceiverKind
impl UnwindSafe for MethodReceiverKind
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> SizedTypeProperties for T
impl<T> SizedTypeProperties for T
Source§#[doc(hidden)]const SIZE: usize = _
#[doc(hidden)]const SIZE: usize = _
sized_type_properties)Source§#[doc(hidden)]const ALIGN: usize = _
#[doc(hidden)]const ALIGN: usize = _
sized_type_properties)Source§#[doc(hidden)]const ALIGNMENT: Alignment = _
#[doc(hidden)]const ALIGNMENT: Alignment = _
ptr_alignment_type)Source§#[doc(hidden)]const IS_ZST: bool = _
#[doc(hidden)]const IS_ZST: bool = _
sized_type_properties)Source§#[doc(hidden)]const LAYOUT: Layout = _
#[doc(hidden)]const LAYOUT: Layout = _
sized_type_properties)Source§#[doc(hidden)]const MAX_SLICE_LEN: usize = _
#[doc(hidden)]const MAX_SLICE_LEN: usize = _
sized_type_properties)[Self]. Read moreimpl<T> Printable for T
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:
None: 0 bytesRef: 0 bytesRefMut: 0 bytesValue: 0 bytesExternalPtrRef: 0 bytesExternalPtrRefMut: 0 bytesExternalPtrValue: 0 bytes