Struct oapi::OApi[][src]

pub struct OApi { /* fields omitted */ }

OpenApi document

This is the main struct of this crate. It contains a fully parsed OpenApi Document wrapped in a SparseRoot to allow for Sparse Pointer expansion.

Implementations

impl OApi[src]

pub fn doc(&self) -> &SparseRoot<OApiDocument>[src]

impl OApi[src]

pub fn check(&self) -> Result<(), OApiError>[src]

Check the document for logic errors

pub fn new(doc: SparseRoot<OApiDocument>) -> Self[src]

Create a new OApi

Methods from Deref<Target = SparseRoot<OApiDocument>>

pub fn check_version(&self) -> Result<(), SparseError>[src]

Get the value this selector is managing, either by deserializing the pointed value or by directly returning the owned value.

pub fn root_get(&self) -> Result<SparseValue<'_, S>, SparseError>[src]

Get the value this selector is managing, either by deserializing the pointed value or by directly returning the owned value.

pub fn save_to_disk(
    &self,
    format: Option<SparseFileFormat>
) -> Result<(), SparseError>
[src]

Save the state to disk in the specified format. If not format is specified, the format in which the document was read will be used. If the document was read from memory, it’ll be written in prettified JSON

pub fn state(&self) -> &Rc<RefCell<SparseState>>[src]

pub fn metadata(&self) -> &SparseMetadata[src]

Trait Implementations

impl Debug for OApi[src]

impl Deref for OApi[src]

type Target = SparseRoot<OApiDocument>

The resulting type after dereferencing.

impl From<SparseRoot<OApiDocument>> for OApi[src]

Auto Trait Implementations

impl !RefUnwindSafe for OApi

impl !Send for OApi

impl !Sync for OApi

impl Unpin for OApi

impl !UnwindSafe for OApi

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,