Struct openrpc_types::Example
source · pub struct Example {
pub name: Option<String>,
pub summary: Option<String>,
pub description: Option<String>,
pub value: ExampleValue,
pub extensions: SpecificationExtensions,
}
Expand description
The Example object is an object that defines an example that is intended to match the schema of a given Content Descriptor.
In all cases, the example value is expected to be compatible with the type schema of its associated value. Tooling implementations MAY choose to validate compatibility automatically, and reject the example value(s) if incompatible.
Fields§
§name: Option<String>
Cannonical name of the example.
summary: Option<String>
Short description for the example.
description: Option<String>
A verbose explanation of the example. GitHub Flavored Markdown syntax MAY be used for rich text representation.
value: ExampleValue
§extensions: SpecificationExtensions
Trait Implementations§
source§impl<'de> Deserialize<'de> for Example
impl<'de> Deserialize<'de> for Example
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>,
Deserialize this value from the given Serde deserializer. Read more
source§impl PartialEq for Example
impl PartialEq for Example
impl StructuralPartialEq for Example
Auto Trait Implementations§
impl Freeze for Example
impl RefUnwindSafe for Example
impl Send for Example
impl Sync for Example
impl Unpin for Example
impl UnwindSafe for Example
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§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)