Struct openrpc_types::resolved::OpenRPC
source · pub struct OpenRPC {
pub openrpc: Version,
pub info: Info,
pub servers: Option<Vec<Server>>,
pub methods: Vec<Method>,
pub components: Option<Components>,
pub external_docs: Option<ExternalDocumentation>,
pub extensions: SpecificationExtensions,
}
Expand description
This is the root object of the OpenRPC document. The contents of this object represent a whole OpenRPC document. How this object is constructed or stored is outside the scope of the OpenRPC Specification.
Fields§
§openrpc: Version
REQUIRED. This string MUST be the semantic version number of the OpenRPC Specification version that the OpenRPC document uses. The openrpc field SHOULD be used by tooling specifications and clients to interpret the OpenRPC document. This is not related to the API info.version string.
info: Info
REQUIRED. Provides metadata about the API. The metadata MAY be used by tooling as required.
servers: Option<Vec<Server>>
An array of Server Objects, which provide connectivity information to a target server. If the servers property is not provided, or is an empty array, the default value would be a Server Object with a url value of
localhost
.
methods: Vec<Method>
REQUIRED. The available methods for the API. While it is required, the array may be empty (to handle security filtering, for example).
components: Option<Components>
An element to hold various schemas for the specification.
external_docs: Option<ExternalDocumentation>
Additional external documentation.
extensions: SpecificationExtensions
Trait Implementations§
source§impl<'de> Deserialize<'de> for OpenRPC
impl<'de> Deserialize<'de> for OpenRPC
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
source§impl PartialEq for OpenRPC
impl PartialEq for OpenRPC
impl StructuralPartialEq for OpenRPC
Auto Trait Implementations§
impl Freeze for OpenRPC
impl RefUnwindSafe for OpenRPC
impl Send for OpenRPC
impl Sync for OpenRPC
impl Unpin for OpenRPC
impl UnwindSafe for OpenRPC
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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)