pub struct XmlBuilder { /* private fields */ }
Expand description
Builder for Xml
with chainable configuration methods to create a new Xml
.
§Examples
Create Xml
with XmlBuilder
.
let xml = XmlBuilder::new()
.name(Some("some_name"))
.prefix(Some("prefix"))
.build();
Implementations§
source§impl XmlBuilder
impl XmlBuilder
sourcepub fn new() -> XmlBuilder
pub fn new() -> XmlBuilder
Constructs a new XmlBuilder
.
source§impl XmlBuilder
impl XmlBuilder
sourcepub fn name<S: Into<Cow<'static, str>>>(self, name: Option<S>) -> Self
pub fn name<S: Into<Cow<'static, str>>>(self, name: Option<S>) -> Self
Add Xml::name
to xml object.
Builder style chainable consuming add name method.
sourcepub fn namespace<S: Into<Cow<'static, str>>>(self, namespace: Option<S>) -> Self
pub fn namespace<S: Into<Cow<'static, str>>>(self, namespace: Option<S>) -> Self
Add Xml::namespace
to xml object.
Builder style chainable consuming add namespace method.
sourcepub fn prefix<S: Into<Cow<'static, str>>>(self, prefix: Option<S>) -> Self
pub fn prefix<S: Into<Cow<'static, str>>>(self, prefix: Option<S>) -> Self
Add Xml::prefix
to xml object.
Builder style chainable consuming add prefix method.
Trait Implementations§
source§impl Default for XmlBuilder
impl Default for XmlBuilder
source§impl From<Xml> for XmlBuilder
impl From<Xml> for XmlBuilder
source§impl From<XmlBuilder> for Xml
impl From<XmlBuilder> for Xml
source§fn from(value: XmlBuilder) -> Self
fn from(value: XmlBuilder) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for XmlBuilder
impl RefUnwindSafe for XmlBuilder
impl Send for XmlBuilder
impl Sync for XmlBuilder
impl Unpin for XmlBuilder
impl UnwindSafe for XmlBuilder
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