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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoCaveat for T
impl<T> IntoCaveat for T
Source§fn into_caveat<W>(self, warnings: Set<W>) -> Caveat<T, W>where
W: Warning,
fn into_caveat<W>(self, warnings: Set<W>) -> Caveat<T, W>where
W: Warning,
Any type can be converted to
Caveat<T> by supplying a list of Warnings.Source§fn into_infallible_caveat(self) -> Caveat<Self, Infallible>
fn into_infallible_caveat(self) -> Caveat<Self, Infallible>
If a
FromSchema is infallible a Caveat can be created using this method.