pub struct ContractPlace<'tcx> {
pub base: PlaceBase,
pub projections: Vec<ContractProjection<'tcx>>,
}Expand description
A place expression referenced by a contract.
Fields§
§base: PlaceBase§projections: Vec<ContractProjection<'tcx>>Implementations§
Source§impl<'tcx> ContractPlace<'tcx>
impl<'tcx> ContractPlace<'tcx>
Sourcepub fn local(base: usize, fields: Vec<(usize, Ty<'tcx>)>) -> Self
pub fn local(base: usize, fields: Vec<(usize, Ty<'tcx>)>) -> Self
Build a place from a concrete MIR local id and field sequence.
Sourcepub fn arg(index: usize) -> Self
pub fn arg(index: usize) -> Self
Build a place from a contract argument reference such as Arg_1.
Sourcepub fn local_base(&self) -> Option<usize>
pub fn local_base(&self) -> Option<usize>
Return the concrete MIR local base when this place is already resolved.
Sourcepub fn field_indices(&self) -> Vec<usize>
pub fn field_indices(&self) -> Vec<usize>
Return field projection indices, dropping type metadata.
Trait Implementations§
Source§impl<'tcx> Clone for ContractPlace<'tcx>
impl<'tcx> Clone for ContractPlace<'tcx>
Source§fn clone(&self) -> ContractPlace<'tcx>
fn clone(&self) -> ContractPlace<'tcx>
Returns a duplicate 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 moreAuto Trait Implementations§
impl<'tcx> Freeze for ContractPlace<'tcx>
impl<'tcx> !RefUnwindSafe for ContractPlace<'tcx>
impl<'tcx> Send for ContractPlace<'tcx>
impl<'tcx> Sync for ContractPlace<'tcx>
impl<'tcx> Unpin for ContractPlace<'tcx>
impl<'tcx> !UnwindSafe for ContractPlace<'tcx>
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