pub enum Or3<A, B, C> {
A(A),
B(B),
C(C),
}Expand description
Represents a union of three types. The first variant will take priority when
deserializing (using #[serde(untagged)] behavior). Additionally, the first
variant is the default.
This relies on the LSP spec putting the “default” variant first. Ordering is maintained between unions in the LSP spec and the order of generic arguments in generated code.
Variants§
Trait Implementations§
Source§impl<'de, A, B, C> Deserialize<'de> for Or3<A, B, C>
impl<'de, A, B, C> Deserialize<'de> for Or3<A, B, C>
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
Auto Trait Implementations§
impl<A, B, C> Freeze for Or3<A, B, C>
impl<A, B, C> RefUnwindSafe for Or3<A, B, C>
impl<A, B, C> Send for Or3<A, B, C>
impl<A, B, C> Sync for Or3<A, B, C>
impl<A, B, C> Unpin for Or3<A, B, C>
impl<A, B, C> UnwindSafe for Or3<A, B, C>
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