pub struct SchemaId(/* private fields */);Expand description
Stable identity for a versioned operation parameter or result schema.
Implementations§
Source§impl SchemaId
impl SchemaId
Sourcepub fn new(value: impl Into<String>) -> Result<Self, SchemaIdError>
pub fn new(value: impl Into<String>) -> Result<Self, SchemaIdError>
Creates and validates a schema identity.
Sourcepub fn parameters(
operation: &OperationName,
version: u32,
) -> Result<Self, SchemaIdError>
pub fn parameters( operation: &OperationName, version: u32, ) -> Result<Self, SchemaIdError>
Derives the parameter schema identity for one operation version.
Sourcepub fn result(
operation: &OperationName,
version: u32,
) -> Result<Self, SchemaIdError>
pub fn result( operation: &OperationName, version: u32, ) -> Result<Self, SchemaIdError>
Derives the result schema identity for one operation version.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for SchemaId
impl<'de> Deserialize<'de> for SchemaId
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 JsonSchema for SchemaId
impl JsonSchema for SchemaId
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Returns a string that uniquely identifies the schema produced by this type. Read more
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Generates a JSON Schema for this type. Read more
Source§fn inline_schema() -> bool
fn inline_schema() -> bool
Whether JSON Schemas generated for this type should be included directly in parent schemas,
rather than being re-used where possible using the
$ref keyword. Read moreSource§impl Ord for SchemaId
impl Ord for SchemaId
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl PartialOrd for SchemaId
impl PartialOrd for SchemaId
impl Eq for SchemaId
impl StructuralPartialEq for SchemaId
Auto Trait Implementations§
impl Freeze for SchemaId
impl RefUnwindSafe for SchemaId
impl Send for SchemaId
impl Sync for SchemaId
impl Unpin for SchemaId
impl UnsafeUnpin for SchemaId
impl UnwindSafe for SchemaId
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,
§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.