pub struct Discriminator {
pub property_name: String,
pub mapping: IndexMap<String, ComponentRef>,
}Expand description
A discriminator for a polymorphic type.
Fields§
§property_name: String§mapping: IndexMap<String, ComponentRef>Trait Implementations§
Source§impl Clone for Discriminator
impl Clone for Discriminator
Source§fn clone(&self) -> Discriminator
fn clone(&self) -> Discriminator
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for Discriminator
impl Debug for Discriminator
Source§impl<'de> Deserialize<'de> for Discriminator
impl<'de> Deserialize<'de> for Discriminator
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 JsonPointee for Discriminator
impl JsonPointee for Discriminator
Source§fn resolve(
&self,
pointer: &JsonPointer,
) -> Result<&dyn JsonPointee, JsonPointeeError>
fn resolve( &self, pointer: &JsonPointer, ) -> Result<&dyn JsonPointee, JsonPointeeError>
Resolves a
JsonPointer against this value.Source§impl<'pointee> JsonPointerTarget<'pointee> for &'pointee Discriminatorwhere
Discriminator: Any,
impl<'pointee> JsonPointerTarget<'pointee> for &'pointee Discriminatorwhere
Discriminator: Any,
Source§fn from_pointee(
pointee: &'pointee dyn JsonPointee,
) -> Result<Self, JsonPointerTargetError>
fn from_pointee( pointee: &'pointee dyn JsonPointee, ) -> Result<Self, JsonPointerTargetError>
Tries to extract
Self from a resolved pointee.Auto Trait Implementations§
impl Freeze for Discriminator
impl RefUnwindSafe for Discriminator
impl Send for Discriminator
impl Sync for Discriminator
impl Unpin for Discriminator
impl UnsafeUnpin for Discriminator
impl UnwindSafe for Discriminator
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§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
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 moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
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 moreSource§impl<P> JsonPointeeExt for Pwhere
P: JsonPointee + ?Sized,
impl<P> JsonPointeeExt for Pwhere
P: JsonPointee + ?Sized,
Source§fn pointer<'a, T>(&'a self, path: &str) -> Result<T, JsonPointerError>where
T: JsonPointerTarget<'a>,
fn pointer<'a, T>(&'a self, path: &str) -> Result<T, JsonPointerError>where
T: JsonPointerTarget<'a>,
Parses a JSON pointer string, resolves it against this value,
and extracts the result as
T.