pub struct Name {
pub prefix: Option<String>,
pub local_part: String,
}
Fields§
§prefix: Option<String>
§local_part: String
Implementations§
Source§impl Name
impl Name
Sourcepub fn new(prefix: Option<&str>, local_part: &str) -> Self
pub fn new(prefix: Option<&str>, local_part: &str) -> Self
A more convenient way to create a new Name.
use nom_xml::Name;
// Create a new Name without a prefix
let name = Name::new(None, "actual name");
// Create a new Name with a prefix
let prefixed_name = Name::new(Some("prefix"), "actual name");
Trait Implementations§
impl Eq for Name
impl StructuralPartialEq for Name
Auto Trait Implementations§
impl Freeze for Name
impl RefUnwindSafe for Name
impl Send for Name
impl Sync for Name
impl Unpin for Name
impl UnwindSafe for Name
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