Enum OneOf9

Source
pub enum OneOf9<A, B, C, D, E, F, G, H, I>{
    A(A),
    B(B),
    C(C),
    D(D),
    E(E),
    F(F),
    G(G),
    H(H),
    I(I),
}
Expand description

OneOf9 type.

This allows modelling of oneOf JSON schemas.

Variants§

§

A(A)

A variant of OneOf9

§

B(B)

B variant of OneOf9

§

C(C)

C variant of OneOf9

§

D(D)

D variant of OneOf9

§

E(E)

E variant of OneOf9

§

F(F)

F variant of OneOf9

§

G(G)

G variant of OneOf9

§

H(H)

H variant of OneOf9

§

I(I)

I variant of OneOf9

Trait Implementations§

Source§

impl<A, B, C, D, E, F, G, H, I> Clone for OneOf9<A, B, C, D, E, F, G, H, I>

Source§

fn clone(&self) -> OneOf9<A, B, C, D, E, F, G, H, I>

Returns a copy of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl<A, B, C, D, E, F, G, H, I> Debug for OneOf9<A, B, C, D, E, F, G, H, I>

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<'b, A, B, C, D, E, F, G, H, I> Deserialize<'b> for OneOf9<A, B, C, D, E, F, G, H, I>
where A: PartialEq + for<'a> Deserialize<'a>, B: PartialEq + for<'a> Deserialize<'a>, C: PartialEq + for<'a> Deserialize<'a>, D: PartialEq + for<'a> Deserialize<'a>, E: PartialEq + for<'a> Deserialize<'a>, F: PartialEq + for<'a> Deserialize<'a>, G: PartialEq + for<'a> Deserialize<'a>, H: PartialEq + for<'a> Deserialize<'a>, I: PartialEq + for<'a> Deserialize<'a>,

Source§

fn deserialize<De: Deserializer<'b>>( deserializer: De, ) -> Result<Self, De::Error>

Deserialize this value from the given Serde deserializer. Read more
Source§

impl<A, B, C, D, E, F, G, H, I> FromStr for OneOf9<A, B, C, D, E, F, G, H, I>

Source§

type Err = &'static str

The associated error which can be returned from parsing.
Source§

fn from_str(x: &str) -> Result<Self, Self::Err>

Parses a string s to return a value of this type. Read more
Source§

impl<A, B, C, D, E, F, G, H, I> LabelledGeneric for OneOf9<A, B, C, D, E, F, G, H, I>

Source§

type Repr = HEither<Variant<A, HCons<Field<(__, _0), A>, HNil>>, HEither<Variant<B, HCons<Field<(__, _0), B>, HNil>>, HEither<Variant<C, HCons<Field<(__, _0), C>, HNil>>, HEither<Variant<D, HCons<Field<(__, _0), D>, HNil>>, HEither<Variant<E, HCons<Field<(__, _0), E>, HNil>>, HEither<Variant<F, HCons<Field<(__, _0), F>, HNil>>, HEither<Variant<G, HCons<Field<(__, _0), G>, HNil>>, HEither<Variant<H, HCons<Field<(__, _0), H>, HNil>>, HEither<Variant<I, HCons<Field<(__, _0), I>, HNil>>, Void>>>>>>>>>

The labelled generic representation type.
Source§

fn into(self) -> Self::Repr

Convert a value to its representation type Repr.
Source§

fn from(repr: Self::Repr) -> Self

Convert a value’s labelled representation type Repr to the values’s type.
Source§

fn convert_from<Src>(src: Src) -> Self
where Src: LabelledGeneric<Repr = Self::Repr>, Self: Sized,

Convert from one type to another using a type with the same labelled generic representation
Source§

fn sculpted_convert_from<A, Indices>(a: A) -> Self
where A: LabelledGeneric, Self: Sized, <A as LabelledGeneric>::Repr: Sculptor<Self::Repr, Indices>,

👎Deprecated: obsolete, transform_from instead
Converts from another type A into Self assuming that A and Self have labelled generic representations that can be sculpted into each other. Read more
Source§

fn transform_from<Src, Indices>(src: Src) -> Self
where Src: LabelledGeneric, Self: Sized, <Src as LabelledGeneric>::Repr: Sculptor<Self::Repr, Indices>,

Converts from another type Src into Self assuming that Src and Self have labelled generic representations that can be sculpted into each other. Read more
Source§

impl<A, B, C, D, E, F, G, H, I> PartialEq for OneOf9<A, B, C, D, E, F, G, H, I>

Source§

fn eq(&self, other: &OneOf9<A, B, C, D, E, F, G, H, I>) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl<A, B, C, D, E, F, G, H, I> Serialize for OneOf9<A, B, C, D, E, F, G, H, I>

Source§

fn serialize<S: Serializer>(&self, serializer: S) -> Result<S::Ok, S::Error>

Serialize this value into the given Serde serializer. Read more
Source§

impl<A, B, C, D, E, F, G, H, I> ToString for OneOf9<A, B, C, D, E, F, G, H, I>

Source§

fn to_string(&self) -> String

Converts the given value to a String. Read more
Source§

impl<A, B, C, D, E, F, G, H, I> Validate for OneOf9<A, B, C, D, E, F, G, H, I>

Source§

impl<A, B, C, D, E, F, G, H, I> StructuralPartialEq for OneOf9<A, B, C, D, E, F, G, H, I>

Auto Trait Implementations§

§

impl<A, B, C, D, E, F, G, H, I> Freeze for OneOf9<A, B, C, D, E, F, G, H, I>
where A: Freeze, B: Freeze, C: Freeze, D: Freeze, E: Freeze, F: Freeze, G: Freeze, H: Freeze, I: Freeze,

§

impl<A, B, C, D, E, F, G, H, I> RefUnwindSafe for OneOf9<A, B, C, D, E, F, G, H, I>

§

impl<A, B, C, D, E, F, G, H, I> Send for OneOf9<A, B, C, D, E, F, G, H, I>
where A: Send, B: Send, C: Send, D: Send, E: Send, F: Send, G: Send, H: Send, I: Send,

§

impl<A, B, C, D, E, F, G, H, I> Sync for OneOf9<A, B, C, D, E, F, G, H, I>
where A: Sync, B: Sync, C: Sync, D: Sync, E: Sync, F: Sync, G: Sync, H: Sync, I: Sync,

§

impl<A, B, C, D, E, F, G, H, I> Unpin for OneOf9<A, B, C, D, E, F, G, H, I>
where A: Unpin, B: Unpin, C: Unpin, D: Unpin, E: Unpin, F: Unpin, G: Unpin, H: Unpin, I: Unpin,

§

impl<A, B, C, D, E, F, G, H, I> UnwindSafe for OneOf9<A, B, C, D, E, F, G, H, I>

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<Choices> CoproductSubsetter<CNil, HNil> for Choices

Source§

type Remainder = Choices

Source§

fn subset( self, ) -> Result<CNil, <Choices as CoproductSubsetter<CNil, HNil>>::Remainder>

Extract a subset of the possible types in a coproduct (or get the remaining possibilities) Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> FromJsonReader for T

Source§

fn from_json_reader<R>(reader: R) -> Result<T, Error<Error>>
where R: Read,

Convert from json reader. Read more
Source§

impl<'de, T> FromJsonSlice<'de> for T
where T: Deserialize<'de> + Validate,

Source§

fn from_json_slice(slice: &'de [u8]) -> Result<T, Error<Error>>

Convert from json slice. Read more
Source§

impl<'de, T> FromJsonStr<'de> for T
where T: Deserialize<'de> + Validate,

Source§

fn from_json_str(str: &'de str) -> Result<T, Error<Error>>

Convert from json str. Read more
Source§

impl<T> FromJsonValue for T

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> if into_left is true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> if into_left(&self) returns true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

impl<A> IntoLabelledGeneric for A
where A: LabelledGeneric,

Source§

type Repr = <A as LabelledGeneric>::Repr

The labelled generic representation type.
Source§

fn into(self) -> <A as IntoLabelledGeneric>::Repr

Convert a value to its representation type Repr.
Source§

impl<T, U, I> LiftInto<U, I> for T
where U: LiftFrom<T, I>,

Source§

fn lift_into(self) -> U

Performs the indexed conversion.
Source§

impl<Source> Sculptor<HNil, HNil> for Source

Source§

type Remainder = Source

Source§

fn sculpt(self) -> (HNil, <Source as Sculptor<HNil, HNil>>::Remainder)

Consumes the current HList and returns an HList with the requested shape. Read more
Source§

impl<T> ToJsonString for T
where T: Serialize + Validate,

Source§

fn to_json_string(&self) -> Result<String, Error>

Convert to json string. Read more
Source§

fn to_json_string_pretty(&self) -> Result<String, Error>

Convert to json pretty string. Read more
Source§

impl<T> ToJsonValue for T
where T: Serialize + Validate,

Source§

fn to_json_value(&self) -> Result<Value, Error>

Convert to json string. Read more
Source§

impl<T> ToJsonWriter for T
where T: Serialize + Validate,

Source§

fn to_json_writer<W>(&self, writer: W) -> Result<(), Error>
where W: Write,

Convert to json writer. Read more
Source§

fn to_json_writer_pretty<W>(&self, writer: W) -> Result<(), Error>
where W: Write,

Convert to pretty json writer. Read more
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> Typeable for T
where T: Any,

Source§

fn get_type(&self) -> TypeId

Get the TypeId of this object.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V

Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,