pub struct Model {
pub nodes: Vec<Node>,
pub roots: Vec<usize>,
pub pass: u64,
}Expand description
The element tree of one frame.
Fields§
§nodes: Vec<Node>§roots: Vec<usize>§pass: u64egui pass it was built from.
Implementations§
Source§impl Model
impl Model
Sourcepub fn build(src: &Sources<'_>, refs: &mut Refs) -> Model
pub fn build(src: &Sources<'_>, refs: &mut Refs) -> Model
Build the tree; refs keeps refs stable across builds.
pub fn get(&self, i: usize) -> Option<&Node>
Sourcepub fn preorder(&self, scope: Option<usize>) -> Vec<usize>
pub fn preorder(&self, scope: Option<usize>) -> Vec<usize>
Nodes in reading order (pre-order), starting at scope or the roots.
pub fn by_key(&self, key: u64) -> Option<usize>
Sourcepub fn shows_text(&self, text: &str) -> bool
pub fn shows_text(&self, text: &str) -> bool
Whether any visible element shows text (in its name or value).
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Model
impl RefUnwindSafe for Model
impl Send for Model
impl Sync for Model
impl Unpin for Model
impl UnsafeUnpin for Model
impl UnwindSafe for Model
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
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 more