pub struct Attribute { /* private fields */ }Expand description
Represents a single XML attribute, including an optional namespace prefix.
This struct models attributes like id="123" or android:name="...".
It is typically owned by an Element.
§Examples
use apk_info_xml::Attribute;
let attr = Attribute::new(None, "id", "123");
assert_eq!(attr.name(), "id");
assert_eq!(attr.value(), "123");
let prefixed = Attribute::new(Some("android"), "name", "android.intent.action.PACKAGE_REMOVED");
assert_eq!(prefixed.to_string(), "android:name=\"android.intent.action.PACKAGE_REMOVED\"");Implementations§
Trait Implementations§
impl Eq for Attribute
impl StructuralPartialEq for Attribute
Auto Trait Implementations§
impl Freeze for Attribute
impl RefUnwindSafe for Attribute
impl Send for Attribute
impl Sync for Attribute
impl Unpin for Attribute
impl UnsafeUnpin for Attribute
impl UnwindSafe for Attribute
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