pub struct Versioned<'buf> { /* private fields */ }Expand description
A json::Element that has been processed by either the infer_version or build
functions and has been identified as being a certain [Version].
Implementations§
Source§impl<'buf> Versioned<'buf>
impl<'buf> Versioned<'buf>
Sourcepub fn into_doc(self) -> Document<'buf>
pub fn into_doc(self) -> Document<'buf>
Return the inner json::Document and discard the version info.
Sourcepub fn as_element(&self) -> &Element<'buf>
pub fn as_element(&self) -> &Element<'buf>
Return the inner json::Element and discard the version info.
Sourcepub fn as_doc(&self) -> &Document<'buf>
pub fn as_doc(&self) -> &Document<'buf>
Return the inner json::Document and discard the version info.
Sourcepub fn as_json_str(&self) -> &'buf str
pub fn as_json_str(&self) -> &'buf str
Return the inner JSON str and discard the version info.
Trait Implementations§
Auto Trait Implementations§
impl<'buf> !Send for Versioned<'buf>
impl<'buf> !Sync for Versioned<'buf>
impl<'buf> Freeze for Versioned<'buf>
impl<'buf> RefUnwindSafe for Versioned<'buf>
impl<'buf> Unpin for Versioned<'buf>
impl<'buf> UnsafeUnpin for Versioned<'buf>
impl<'buf> UnwindSafe for Versioned<'buf>
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