Skip to main content

Stream

Struct Stream 

Source
pub struct Stream {
    pub root: ObjId,
    pub objects: Vec<Object>,
}

Fields§

§root: ObjId§objects: Vec<Object>

Implementations§

Source§

impl Stream

Source

pub fn object(&self, id: ObjId) -> Option<&Object>

Source

pub fn field(&self, id: ObjId, tag: &[u8; 4]) -> Option<&Value>

Source

pub fn class(&self, id: ObjId) -> Option<Tag>

Source

pub fn is(&self, id: ObjId, class: &[u8; 4]) -> bool

Source

pub fn obj(&self, id: ObjId, tag: &[u8; 4]) -> Option<ObjId>

A child object (shared, linked or inline); None for null or missing.

Source

pub fn objs(&self, id: ObjId, tag: &[u8; 4]) -> Vec<ObjId>

An array of objects (nulls skipped).

Source

pub fn f64(&self, id: ObjId, tag: &[u8; 4]) -> Option<f64>

Source

pub fn int(&self, id: ObjId, tag: &[u8; 4]) -> Option<i64>

Source

pub fn bool(&self, id: ObjId, tag: &[u8; 4]) -> Option<bool>

Source

pub fn str(&self, id: ObjId, tag: &[u8; 4]) -> Option<&str>

Source

pub fn enumeration(&self, id: ObjId, tag: &[u8; 4]) -> Option<(u16, u16)>

Source

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).

Source

pub fn bytes(&self, id: ObjId, tag: &[u8; 4]) -> Option<&[u8]>

Source

pub fn entry(&self, id: ObjId, tag: &[u8; 4]) -> Option<&str>

Source

pub fn positional(&self, id: ObjId) -> impl Iterator<Item = &Value>

Untagged fields of a positional object, in order.

Trait Implementations§

Source§

impl Debug for Stream

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

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> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.