pub struct Stream {
pub root: ObjId,
pub objects: Vec<Object>,
}Fields§
§root: ObjId§objects: Vec<Object>Implementations§
Source§impl Stream
impl Stream
pub fn object(&self, id: ObjId) -> Option<&Object>
pub fn field(&self, id: ObjId, tag: &[u8; 4]) -> Option<&Value>
pub fn class(&self, id: ObjId) -> Option<Tag>
pub fn is(&self, id: ObjId, class: &[u8; 4]) -> bool
Sourcepub fn obj(&self, id: ObjId, tag: &[u8; 4]) -> Option<ObjId>
pub fn obj(&self, id: ObjId, tag: &[u8; 4]) -> Option<ObjId>
A child object (shared, linked or inline); None for null or missing.
Sourcepub fn objs(&self, id: ObjId, tag: &[u8; 4]) -> Vec<ObjId>
pub fn objs(&self, id: ObjId, tag: &[u8; 4]) -> Vec<ObjId>
An array of objects (nulls skipped).
pub fn f64(&self, id: ObjId, tag: &[u8; 4]) -> Option<f64>
pub fn int(&self, id: ObjId, tag: &[u8; 4]) -> Option<i64>
pub fn bool(&self, id: ObjId, tag: &[u8; 4]) -> Option<bool>
pub fn str(&self, id: ObjId, tag: &[u8; 4]) -> Option<&str>
pub fn enumeration(&self, id: ObjId, tag: &[u8; 4]) -> Option<(u16, u16)>
Sourcepub fn floats<const N: usize>(
&self,
id: ObjId,
tag: &[u8; 4],
) -> Option<[f64; N]>
pub fn floats<const N: usize>( &self, id: ObjId, tag: &[u8; 4], ) -> Option<[f64; N]>
A fixed vector of N finite floats (points, rectangles, transforms).
pub fn bytes(&self, id: ObjId, tag: &[u8; 4]) -> Option<&[u8]>
pub fn entry(&self, id: ObjId, tag: &[u8; 4]) -> Option<&str>
Sourcepub fn positional(&self, id: ObjId) -> impl Iterator<Item = &Value>
pub fn positional(&self, id: ObjId) -> impl Iterator<Item = &Value>
Untagged fields of a positional object, in order.
Trait Implementations§
Auto Trait Implementations§
impl Forget for Stream
impl Freeze for Stream
impl Move for Stream
impl RefUnwindSafe for Stream
impl Send for Stream
impl Sync for Stream
impl Unpin for Stream
impl UnsafeUnpin for Stream
impl UnwindSafe for Stream
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