pub struct MirCallArgBinding<'a> {
pub arg: &'a MirCallArg,
pub local: &'a LocalInfo,
}Expand description
Shared call-argument query object used by validation and backends.
Fields§
§arg: &'a MirCallArgCall argument payload.
local: &'a LocalInfoLocal metadata referenced by the argument.
Implementations§
Source§impl<'a> MirCallArgBinding<'a>
impl<'a> MirCallArgBinding<'a>
Sourcepub fn local_id(self) -> MirLocalId
pub fn local_id(self) -> MirLocalId
Return the referenced local id.
Sourcepub fn is_borrowed(self) -> bool
pub fn is_borrowed(self) -> bool
Return whether the argument mode is read-only borrow.
Sourcepub fn is_mutable_borrow(self) -> bool
pub fn is_mutable_borrow(self) -> bool
Return whether the argument mode is mutable borrow.
Sourcepub fn is_owned_move(self) -> bool
pub fn is_owned_move(self) -> bool
Return whether the argument mode is owned move.
Sourcepub fn is_owned_copy(self) -> bool
pub fn is_owned_copy(self) -> bool
Return whether the argument mode is owned copy.
Sourcepub fn is_mutable_place(self) -> bool
pub fn is_mutable_place(self) -> bool
Return whether the argument local stores a mutable place/reference.
Sourcepub fn place_item_ty(self) -> Option<&'a Ty>
pub fn place_item_ty(self) -> Option<&'a Ty>
Return the place item type, when the local is place-shaped.
Sourcepub fn requires_deref_read(self) -> bool
pub fn requires_deref_read(self) -> bool
Return whether reading the argument as a value requires dereferencing.
Sourcepub fn is_slice_place(self) -> bool
pub fn is_slice_place(self) -> bool
Return whether the place item is a slice view.
Trait Implementations§
Source§impl<'a> Clone for MirCallArgBinding<'a>
impl<'a> Clone for MirCallArgBinding<'a>
Source§fn clone(&self) -> MirCallArgBinding<'a>
fn clone(&self) -> MirCallArgBinding<'a>
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl<'a> Debug for MirCallArgBinding<'a>
impl<'a> Debug for MirCallArgBinding<'a>
impl<'a> Copy for MirCallArgBinding<'a>
Auto Trait Implementations§
impl<'a> Freeze for MirCallArgBinding<'a>
impl<'a> RefUnwindSafe for MirCallArgBinding<'a>
impl<'a> Send for MirCallArgBinding<'a>
impl<'a> Sync for MirCallArgBinding<'a>
impl<'a> Unpin for MirCallArgBinding<'a>
impl<'a> UnwindSafe for MirCallArgBinding<'a>
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