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
Ref(Ref)
T(T)
Trait Implementations
sourceimpl<'de, T> Deserialize<'de> for RefOr<T> where
T: Deserialize<'de>,
impl<'de, T> Deserialize<'de> for RefOr<T> where
T: Deserialize<'de>,
sourcefn 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
sourceimpl From<ArrayBuilder> for RefOr<Schema>
impl From<ArrayBuilder> for RefOr<Schema>
sourcefn from(array: ArrayBuilder) -> Self
fn from(array: ArrayBuilder) -> Self
Converts to this type from the input type.
sourceimpl From<ObjectBuilder> for RefOr<Schema>
impl From<ObjectBuilder> for RefOr<Schema>
sourcefn from(builder: ObjectBuilder) -> Self
fn from(builder: ObjectBuilder) -> Self
Converts to this type from the input type.
sourceimpl From<OneOfBuilder> for RefOr<Schema>
impl From<OneOfBuilder> for RefOr<Schema>
sourcefn from(one_of: OneOfBuilder) -> Self
fn from(one_of: OneOfBuilder) -> Self
Converts to this type from the input type.
Auto Trait Implementations
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
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more