Enum salvo_oapi::RefOr
source · 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<T> From<RefOr<T>> for AdditionalProperties<T>
impl<T> From<RefOr<T>> for AdditionalProperties<T>
source§impl<T: PartialEq> PartialEq for RefOr<T>
impl<T: PartialEq> PartialEq for RefOr<T>
impl<T: Eq> Eq for RefOr<T>
impl<T> StructuralEq for RefOr<T>
impl<T> StructuralPartialEq for RefOr<T>
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§
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
§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
Checks if this value is equivalent to the given key. Read more
§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.