pub struct RecInst {
pub type_name: Option<String>,
pub rt: RT,
pub path: Rc<SegPath>,
pub ps: RefCell<Option<String>>,
pub parent: Option<Rc<RefCell<RecInst>>>,
pub slots: Vec<(Rc<str>, Slot)>,
pub entry_order: Rc<Vec<String>>,
pub extras: Vec<(String, Value)>,
pub menv: Option<Rc<Env>>,
}Expand description
a record instance: its type, its path, its slots
Fields§
§type_name: Option<String>the type’s name, when named
rt: RTthe type
path: Rc<SegPath>its canonical path
ps: RefCell<Option<String>>cached path_str(path) for the slot key (F21); path is immutable
parent: Option<Rc<RefCell<RecInst>>>the enclosing instance
slots: Vec<(Rc<str>, Slot)>the slots, in declaration order
entry_order: Rc<Vec<String>>the order the document supplied the members
extras: Vec<(String, Value)>members of an open record beyond its type
menv: Option<Rc<Env>>the module environment
Implementations§
Source§impl RecInst
impl RecInst
Sourcepub fn entry_order(&self) -> &[String]
pub fn entry_order(&self) -> &[String]
Borrow the member order captured from the input document.
Sourcepub fn entry_order_snapshot(&self) -> Rc<Vec<String>>
pub fn entry_order_snapshot(&self) -> Rc<Vec<String>>
Retain the current order independently of later record mutation.
Sourcepub fn entry_order_mut(&mut self) -> &mut Vec<String>
pub fn entry_order_mut(&mut self) -> &mut Vec<String>
Edit this record’s order without changing other records or snapshots.
Auto Trait Implementations§
impl !Freeze for RecInst
impl !RefUnwindSafe for RecInst
impl !Send for RecInst
impl !Sync for RecInst
impl !UnwindSafe for RecInst
impl Forget for RecInst
impl Move for RecInst
impl Unpin for RecInst
impl UnsafeUnpin for RecInst
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