pub(crate) struct ContractPlace {
pub base: PlaceBase,
pub projections: Vec<ContractProjection>,
}Expand description
A place a contract refers to: a PlaceBase root plus a sequence of
ContractProjection steps into it (e.g. self.next.value).
Fields§
§base: PlaceBaseThe root: return value, an argument, or a MIR local.
projections: Vec<ContractProjection>Field / Some-unwrap / element steps from the base down.
Implementations§
Source§impl ContractPlace
impl ContractPlace
pub(crate) fn display_user_friendly<'tcx>( &self, tcx: TyCtxt<'tcx>, struct_def_id: Option<DefId>, fn_def_id: Option<DefId>, ) -> String
Source§impl ContractPlace
impl ContractPlace
pub(crate) fn local(base: usize, fields: Vec<usize>) -> Self
pub(crate) fn arg(index: usize) -> Self
pub(crate) fn local_base(&self) -> Option<usize>
Sourcepub(crate) fn plain_field_path(&self) -> Option<Vec<usize>>
pub(crate) fn plain_field_path(&self) -> Option<Vec<usize>>
The field indices when this place is a pure Field chain (no Downcast
/ ForEach steps), otherwise None. Shared by the exec- and
checker-side Len evaluators.
Trait Implementations§
Source§impl Clone for ContractPlace
impl Clone for ContractPlace
Source§impl Debug for ContractPlace
impl Debug for ContractPlace
impl Eq for ContractPlace
Source§impl Hash for ContractPlace
impl Hash for ContractPlace
Source§impl PartialEq for ContractPlace
impl PartialEq for ContractPlace
impl StructuralPartialEq for ContractPlace
Auto Trait Implementations§
impl DynSend for ContractPlace
impl DynSync for ContractPlace
impl Forget for ContractPlace
impl Freeze for ContractPlace
impl Move for ContractPlace
impl RefUnwindSafe for ContractPlace
impl Send for ContractPlace
impl Sync for ContractPlace
impl Unpin for ContractPlace
impl UnsafeUnpin for ContractPlace
impl UnwindSafe for ContractPlace
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
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
Checks if this value is equivalent to the given key. Read more
§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
Compare self to
key and return true if they are equal.§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
Checks if this value is equivalent to the given key. Read more
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