pub struct Node {
pub index: u32,
pub layout: Rc<NodeLayout>,
pub values: Vec<Value>,
}Expand description
A node: its type, index and field values in its layout’s order.
Fields§
§index: u32§layout: Rc<NodeLayout>§values: Vec<Value>Implementations§
Source§impl Node
impl Node
pub fn node_type(&self) -> u16
pub fn type_name(&self) -> &str
Sourcepub fn field(&self, name: &str) -> Option<&Value>
pub fn field(&self, name: &str) -> Option<&Value>
A field by name; None when this file’s layout has no such field.
Sourcepub fn int(&self, name: &str) -> Option<i64>
pub fn int(&self, name: &str) -> Option<i64>
An integer or pointer field; unset and absent read as None.
Sourcepub fn ptr(&self, name: &str) -> u32
pub fn ptr(&self, name: &str) -> u32
A pointer field’s index; null, unset and absent read as 0.
pub fn real(&self, name: &str) -> Option<f64>
pub fn vector(&self, name: &str) -> Option<[f64; 3]>
pub fn interval(&self, name: &str) -> Option<[Option<f64>; 2]>
pub fn char(&self, name: &str) -> Option<u8>
pub fn text(&self, name: &str) -> Option<&str>
pub fn array(&self, name: &str) -> &[Value]
Trait Implementations§
Auto Trait Implementations§
impl !Send for Node
impl !Sync for Node
impl Forget for Node
impl Freeze for Node
impl Move for Node
impl RefUnwindSafe for Node
impl Unpin for Node
impl UnsafeUnpin for Node
impl UnwindSafe for Node
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