pub struct Tree {
pub fields: Vec<Field>,
pub nodes: Vec<Node>,
}Expand description
A parsed section.
Fields§
§fields: Vec<Field>§nodes: Vec<Node>Implementations§
Source§impl Tree
impl Tree
pub fn root(&self) -> usize
pub fn node(&self, i: usize) -> &Node
Sourcepub fn children_with_prefix(&self, i: usize, prefix: &str) -> Vec<(&str, usize)>
pub fn children_with_prefix(&self, i: usize, prefix: &str) -> Vec<(&str, usize)>
All children of struct i whose field name starts with prefix,
with their full field names.
Sourcepub fn children(&self, i: usize, name: &str) -> Vec<usize>
pub fn children(&self, i: usize, name: &str) -> Vec<usize>
All children named name (repeated fields, flattened lists).
pub fn int(&self, i: usize) -> Option<i64>
pub fn int_at(&self, i: usize, name: &str) -> Option<i64>
pub fn dbl(&self, i: usize) -> Option<f64>
pub fn dbl_at(&self, i: usize, name: &str) -> Option<f64>
pub fn list(&self, i: usize) -> &[usize]
Sourcepub fn dbls(&self, i: usize) -> Vec<f64>
pub fn dbls(&self, i: usize) -> Vec<f64>
A flat list of doubles (NaN for anything that is not a number).
pub fn str_at(&self, i: usize, name: &str) -> Option<&str>
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Tree
impl RefUnwindSafe for Tree
impl Send for Tree
impl Sync for Tree
impl Unpin for Tree
impl UnsafeUnpin for Tree
impl UnwindSafe for Tree
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
impl<A, B, T> HttpServerConnExec<A, B> for Twhere
B: Body,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreimpl<T> Parallelizable for T
§impl<T> Pointable for T
impl<T> Pointable for T
§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> Read<Exclusive, BecauseExclusive> for Twhere
T: ?Sized,
§impl<U, T> ToOwnedObj<U> for Twhere
U: FromObjRef<T>,
impl<U, T> ToOwnedObj<U> for Twhere
U: FromObjRef<T>,
§fn to_owned_obj(&self, data: FontData<'_>) -> U
fn to_owned_obj(&self, data: FontData<'_>) -> U
Convert this type into
T, using the provided data to resolve any offsets.