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]
impl OApi
[src]pub fn doc(&self) -> &SparseRoot<OApiDocument>
[src]
impl OApi
[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]
&self,
format: Option<SparseFileFormat>
) -> Result<(), SparseError>
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 Deref for OApi
[src]
impl Deref for OApi
[src]type Target = SparseRoot<OApiDocument>
The resulting type after dereferencing.
fn deref(&self) -> &Self::Target
[src]
impl From<SparseRoot<OApiDocument>> for OApi
[src]
impl From<SparseRoot<OApiDocument>> for OApi
[src]fn from(doc: SparseRoot<OApiDocument>) -> Self
[src]
Auto Trait Implementations
impl !RefUnwindSafe for OApi
impl !RefUnwindSafe for OApi
impl !UnwindSafe for OApi
impl !UnwindSafe for OApi