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
sourceimpl XmlBuilder
impl XmlBuilder
sourcepub fn new() -> XmlBuilder
pub fn new() -> XmlBuilder
Constructs a new XmlBuilder
.
sourceimpl 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
sourceimpl Default for XmlBuilder
impl Default for XmlBuilder
sourceimpl From<Xml> for XmlBuilder
impl From<Xml> for XmlBuilder
sourceimpl From<XmlBuilder> for Xml
impl From<XmlBuilder> for Xml
sourcefn from(value: XmlBuilder) -> Self
fn from(value: XmlBuilder) -> Self
Converts to this type from the input type.
Auto Trait Implementations
impl RefUnwindSafe for XmlBuilder
impl Send for XmlBuilder
impl Sync for XmlBuilder
impl Unpin for XmlBuilder
impl UnwindSafe for XmlBuilder
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more