pub struct Ref {
pub location: String,
pub summary: Option<String>,
pub description: Option<String>,
}Expand description
A reference to another part of this or another description.
§This is not a JSON Schema $ref
The specification draws a sharp line that is easy to miss. A Reference
Object — this type — has exactly three fields, and any other property
present alongside them shall be ignored. A Schema Object $ref is
plain JSON Schema 2020-12, where sibling keywords are fully applied.
Schema therefore models $ref as an ordinary keyword,
and does not use this type.
Accordingly this object carries no Extensions: it
cannot be extended.
Fields§
§location: StringThe URI of the referenced component.
summary: Option<String>A short summary, overriding that of the referenced component.
description: Option<String>A description, overriding that of the referenced component.
CommonMark syntax may be used.
Implementations§
Source§impl Ref
impl Ref
Sourcepub fn request_body(name: &str) -> Self
pub fn request_body(name: &str) -> Self
References a named entry under #/components/requestBodies.
Sourcepub fn security_scheme(name: &str) -> Self
pub fn security_scheme(name: &str) -> Self
References a named entry under #/components/securitySchemes.
Sourcepub fn with_summary(self, summary: impl Into<String>) -> Self
pub fn with_summary(self, summary: impl Into<String>) -> Self
Sets the overriding summary.
Sourcepub fn with_description(self, description: impl Into<String>) -> Self
pub fn with_description(self, description: impl Into<String>) -> Self
Sets the overriding description.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Ref
impl<'de> Deserialize<'de> for Ref
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>,
impl Eq for Ref
impl StructuralPartialEq for Ref
Auto Trait Implementations§
impl Freeze for Ref
impl RefUnwindSafe for Ref
impl Send for Ref
impl Sync for Ref
impl Unpin for Ref
impl UnsafeUnpin for Ref
impl UnwindSafe for Ref
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,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.