pub enum RefOr<T> {
Ref(Ref),
T(T),
}
Expand description
A Ref
or some other type T
.
Typically used in combination with Components
and is an union type between Ref
and any
other given type such as Schema
or Response
.
Variants§
Trait Implementations§
source§impl<'de, T> Deserialize<'de> for RefOr<T>where
T: Deserialize<'de>,
impl<'de, T> Deserialize<'de> for RefOr<T>where
T: Deserialize<'de>,
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 From<AllOfBuilder> for RefOr<Schema>
impl From<AllOfBuilder> for RefOr<Schema>
source§fn from(one_of: AllOfBuilder) -> Self
fn from(one_of: AllOfBuilder) -> Self
Converts to this type from the input type.
source§impl From<AnyOfBuilder> for RefOr<Schema>
impl From<AnyOfBuilder> for RefOr<Schema>
source§fn from(any_of: AnyOfBuilder) -> Self
fn from(any_of: AnyOfBuilder) -> Self
Converts to this type from the input type.
source§impl From<ArrayBuilder> for RefOr<Schema>
impl From<ArrayBuilder> for RefOr<Schema>
source§fn from(array: ArrayBuilder) -> Self
fn from(array: ArrayBuilder) -> Self
Converts to this type from the input type.
source§impl From<ExampleBuilder> for RefOr<Example>
impl From<ExampleBuilder> for RefOr<Example>
source§fn from(example_builder: ExampleBuilder) -> Self
fn from(example_builder: ExampleBuilder) -> Self
Converts to this type from the input type.
source§impl From<ObjectBuilder> for RefOr<Schema>
impl From<ObjectBuilder> for RefOr<Schema>
source§fn from(builder: ObjectBuilder) -> Self
fn from(builder: ObjectBuilder) -> Self
Converts to this type from the input type.
source§impl From<OneOfBuilder> for RefOr<Schema>
impl From<OneOfBuilder> for RefOr<Schema>
source§fn from(one_of: OneOfBuilder) -> Self
fn from(one_of: OneOfBuilder) -> Self
Converts to this type from the input type.
source§impl<T> From<RefOr<T>> for AdditionalProperties<T>
impl<T> From<RefOr<T>> for AdditionalProperties<T>
source§impl From<ResponseBuilder> for RefOr<Response>
impl From<ResponseBuilder> for RefOr<Response>
source§fn from(builder: ResponseBuilder) -> Self
fn from(builder: ResponseBuilder) -> Self
Converts to this type from the input type.
source§impl<T: PartialEq> PartialEq for RefOr<T>
impl<T: PartialEq> PartialEq for RefOr<T>
impl<T: Eq> Eq for RefOr<T>
impl<T> StructuralPartialEq for RefOr<T>
Auto Trait Implementations§
impl<T> Freeze for RefOr<T>where
T: Freeze,
impl<T> RefUnwindSafe for RefOr<T>where
T: RefUnwindSafe,
impl<T> Send for RefOr<T>where
T: Send,
impl<T> Sync for RefOr<T>where
T: Sync,
impl<T> Unpin for RefOr<T>where
T: Unpin,
impl<T> UnwindSafe for RefOr<T>where
T: UnwindSafe,
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
)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
Compare self to
key
and return true
if they are equal.