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>(self, name: Option<S>) -> XmlBuilder
pub fn name<S>(self, name: Option<S>) -> XmlBuilder
Add Xml::name to xml object.
Builder style chainable consuming add name method.
Sourcepub fn namespace<S>(self, namespace: Option<S>) -> XmlBuilder
pub fn namespace<S>(self, namespace: Option<S>) -> XmlBuilder
Add Xml::namespace to xml object.
Builder style chainable consuming add namespace method.
Sourcepub fn prefix<S>(self, prefix: Option<S>) -> XmlBuilder
pub fn prefix<S>(self, prefix: Option<S>) -> XmlBuilder
Add Xml::prefix to xml object.
Builder style chainable consuming add prefix method.
Sourcepub fn attribute(self, attribute: Option<bool>) -> XmlBuilder
pub fn attribute(self, attribute: Option<bool>) -> XmlBuilder
Mark Xml object as attribute. See Xml::attribute.
Builder style chainable consuming add attribute method.
Sourcepub fn wrapped(self, wrapped: Option<bool>) -> XmlBuilder
pub fn wrapped(self, wrapped: Option<bool>) -> XmlBuilder
Mark Xml object wrapped. See Xml::wrapped.
Builder style chainable consuming add wrapped method.
Trait Implementations§
Source§impl Default for XmlBuilder
impl Default for XmlBuilder
Source§fn default() -> XmlBuilder
fn default() -> XmlBuilder
Returns the “default value” for a type. Read more
Source§impl From<Xml> for XmlBuilder
impl From<Xml> for XmlBuilder
Source§fn from(value: Xml) -> XmlBuilder
fn from(value: Xml) -> XmlBuilder
Converts to this type from the input type.
Source§impl From<XmlBuilder> for Xml
impl From<XmlBuilder> for Xml
Source§fn from(value: XmlBuilder) -> Xml
fn from(value: XmlBuilder) -> Xml
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