pub struct ValidatedXml(/* private fields */);Expand description
A cheap-to-clone, validated XML document retaining the exact original bytes.
Implementations§
Source§impl ValidatedXml
impl ValidatedXml
pub fn new(bytes: impl Into<Arc<[u8]>>) -> Result<Self, Error>
pub fn with_policy( bytes: impl Into<Arc<[u8]>>, policy: XmlSafetyPolicy, ) -> Result<Self, Error>
pub fn from_reader<R: Read>(reader: R) -> Result<Self, Error>
pub fn as_bytes(&self) -> &[u8] ⓘ
pub fn document(&self) -> &OwnedDocument
Trait Implementations§
Source§impl Clone for ValidatedXml
impl Clone for ValidatedXml
Source§fn clone(&self) -> ValidatedXml
fn clone(&self) -> ValidatedXml
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for ValidatedXml
impl RefUnwindSafe for ValidatedXml
impl Send for ValidatedXml
impl Sync for ValidatedXml
impl Unpin for ValidatedXml
impl UnsafeUnpin for ValidatedXml
impl UnwindSafe for ValidatedXml
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