pub struct Place {
place: usize,
projections: Vec<Projection>,
}Fields§
§place: usize§projections: Vec<Projection>Implementations§
Source§impl Place
impl Place
Sourcepub fn new(value: &Expr, env: &mut Environment) -> IResult<Self>
pub fn new(value: &Expr, env: &mut Environment) -> IResult<Self>
Creates a new Place Projection expression from an [Expr].
If a place-projection can’t be constructed, returns Error::NotPlace.
Sourcepub fn new_or_temporary(value: &Expr, env: &mut Environment) -> IResult<Self>
pub fn new_or_temporary(value: &Expr, env: &mut Environment) -> IResult<Self>
Creates a new Place if this [Expr] is a place expression, otherwise allocates a new temporary and returns a Place-reference to it.
pub fn from_index(index: usize) -> Self
pub fn with(self, projection: Projection) -> Self
pub fn deref(self) -> Self
pub fn index(self, idx: usize, from_end: bool) -> Self
pub fn dot_idx(self, idx: usize) -> Self
pub fn dot_sym(self, sym: impl Into<Symbol>) -> Self
pub fn get_mut<'v, 'e: 'v>( &self, env: &'e mut Environment, ) -> IResult<&'v mut ConValue>
pub fn get<'e>(&self, env: &'e Environment) -> IResult<&'e ConValue>
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Place
impl RefUnwindSafe for Place
impl Send for Place
impl Sync for Place
impl Unpin for Place
impl UnsafeUnpin for Place
impl UnwindSafe for Place
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