pub enum AirParamMode {
Normal,
MutRef,
Ref,
}Expand description
Parameter passing mode in AIR.
Mirrors gruel_rir::RirParamMode. MutRef / Ref are the
vestigial-but-used by-pointer markers that survive ADR-0076 for
parameters whose declared type cannot itself be wrapped as
MutRef(...) / Ref(...) in the type pool (notably interface params).
Variants§
Normal
Normal pass-by-value parameter (or any reference whose ref-ness is
already encoded in the parameter Type).
MutRef
Exclusive mutable borrow (interface-by-pointer ABI).
Ref
Shared immutable borrow (interface-by-pointer ABI).
Implementations§
Source§impl AirParamMode
impl AirParamMode
Sourcepub fn is_by_ref(self) -> bool
pub fn is_by_ref(self) -> bool
Returns true if the parameter is passed by reference per the legacy
mode mechanism. Type-driven Ref(T) / MutRef(T) parameters are
not detected here; callers must additionally inspect the parameter
Type.
Sourcepub fn is_mut_ref(self) -> bool
pub fn is_mut_ref(self) -> bool
Returns true if the parameter is an exclusive mutable borrow per the legacy mode mechanism.
Trait Implementations§
Source§impl Clone for AirParamMode
impl Clone for AirParamMode
Source§fn clone(&self) -> AirParamMode
fn clone(&self) -> AirParamMode
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for AirParamMode
impl Debug for AirParamMode
Source§impl Default for AirParamMode
impl Default for AirParamMode
Source§fn default() -> AirParamMode
fn default() -> AirParamMode
Source§impl<'de> Deserialize<'de> for AirParamMode
impl<'de> Deserialize<'de> for AirParamMode
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Source§impl From<RirParamMode> for AirParamMode
impl From<RirParamMode> for AirParamMode
Source§fn from(mode: RirParamMode) -> Self
fn from(mode: RirParamMode) -> Self
Source§impl PartialEq for AirParamMode
impl PartialEq for AirParamMode
Source§impl Serialize for AirParamMode
impl Serialize for AirParamMode
impl Copy for AirParamMode
impl Eq for AirParamMode
impl StructuralPartialEq for AirParamMode
Auto Trait Implementations§
impl Freeze for AirParamMode
impl RefUnwindSafe for AirParamMode
impl Send for AirParamMode
impl Sync for AirParamMode
impl Unpin for AirParamMode
impl UnsafeUnpin for AirParamMode
impl UnwindSafe for AirParamMode
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,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
§impl<'src, T> IntoMaybe<'src, T> for Twhere
T: 'src,
impl<'src, T> IntoMaybe<'src, T> for Twhere
T: 'src,
§impl<'p, T> Seq<'p, T> for Twhere
T: Clone,
impl<'p, T> Seq<'p, T> for Twhere
T: Clone,
§type Iter<'a> = Once<&'a T>
where
T: 'a
type Iter<'a> = Once<&'a T> where T: 'a
§fn contains(&self, val: &T) -> boolwhere
T: PartialEq,
fn contains(&self, val: &T) -> boolwhere
T: PartialEq,
§fn to_maybe_ref<'b>(item: <T as Seq<'p, T>>::Item<'b>) -> Maybe<T, &'p T>where
'p: 'b,
fn to_maybe_ref<'b>(item: <T as Seq<'p, T>>::Item<'b>) -> Maybe<T, &'p T>where
'p: 'b,
MaybeRef].