pub struct Builder<'a> { /* private fields */ }
Expand description
Represents a builder for constructing an XML document.
Implementations§
Source§impl<'a> Builder<'a>
impl<'a> Builder<'a>
Sourcepub fn new(declaration: Declaration<'a>, element: Element<'a>) -> Self
pub fn new(declaration: Declaration<'a>, element: Element<'a>) -> Self
Creates a new instance of Builder
with the given declaration and root element.
§Arguments
declaration
- The XML declaration.element
- The root element of the XML document.
§Example
let declaration = Declaration::new("1.0", "UTF-8");
let element = Element::new("root");
let builder = Builder::new(declaration, element);
Trait Implementations§
Auto Trait Implementations§
impl<'a> Freeze for Builder<'a>
impl<'a> RefUnwindSafe for Builder<'a>
impl<'a> Send for Builder<'a>
impl<'a> Sync for Builder<'a>
impl<'a> Unpin for Builder<'a>
impl<'a> UnwindSafe for Builder<'a>
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