pub struct Element {
pub ns: Option<String>,
pub name: String,
pub attrs: Vec<Attr>,
pub children: Vec<Node>,
}Fields§
§ns: Option<String>§name: String§attrs: Vec<Attr>§children: Vec<Node>Implementations§
Source§impl Element
impl Element
pub fn new(name: &str, attrs: Vec<Attr>) -> Element
pub fn attr(&self, res_id: u32) -> Option<&Attr>
pub fn android_name(&self) -> Option<&str>
pub fn set(&mut self, a: Attr)
pub fn remove(&mut self, res_id: u32)
pub fn elements(&self) -> impl Iterator<Item = &Element>
pub fn elements_mut(&mut self) -> impl Iterator<Item = &mut Element>
pub fn child_mut(&mut self, name: &str) -> Option<&mut Element>
pub fn push(&mut self, e: Element)
Trait Implementations§
impl StructuralPartialEq for Element
Auto Trait Implementations§
impl Freeze for Element
impl RefUnwindSafe for Element
impl Send for Element
impl Sync for Element
impl Unpin for Element
impl UnsafeUnpin for Element
impl UnwindSafe for Element
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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