Struct ink_metadata::layout::Discriminant
source · pub struct Discriminant(/* private fields */);
Expand description
The discriminant of an enum variant.
Implementations§
Trait Implementations§
source§impl Clone for Discriminant
impl Clone for Discriminant
source§fn clone(&self) -> Discriminant
fn clone(&self) -> Discriminant
Returns a copy 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 Discriminant
impl Debug for Discriminant
source§impl<'de> Deserialize<'de> for Discriminant
impl<'de> Deserialize<'de> for Discriminant
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 From<usize> for Discriminant
impl From<usize> for Discriminant
source§impl JsonSchema for Discriminant
impl JsonSchema for Discriminant
source§fn schema_name() -> String
fn schema_name() -> String
The name of the generated JSON Schema. Read more
source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Returns a string that uniquely identifies the schema produced by this type. Read more
source§fn json_schema(gen: &mut SchemaGenerator) -> Schema
fn json_schema(gen: &mut SchemaGenerator) -> Schema
Generates a JSON Schema for this type. Read more
§fn is_referenceable() -> bool
fn is_referenceable() -> bool
Whether JSON Schemas generated for this type should be re-used where possible using the
$ref
keyword. Read moresource§impl Ord for Discriminant
impl Ord for Discriminant
source§fn cmp(&self, other: &Discriminant) -> Ordering
fn cmp(&self, other: &Discriminant) -> Ordering
1.21.0 · source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
source§impl PartialEq for Discriminant
impl PartialEq for Discriminant
source§fn eq(&self, other: &Discriminant) -> bool
fn eq(&self, other: &Discriminant) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl PartialOrd for Discriminant
impl PartialOrd for Discriminant
source§fn partial_cmp(&self, other: &Discriminant) -> Option<Ordering>
fn partial_cmp(&self, other: &Discriminant) -> Option<Ordering>
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self
and other
) and is used by the <=
operator. Read moresource§impl Serialize for Discriminant
impl Serialize for Discriminant
impl Copy for Discriminant
impl Eq for Discriminant
impl StructuralPartialEq for Discriminant
Auto Trait Implementations§
impl Freeze for Discriminant
impl RefUnwindSafe for Discriminant
impl Send for Discriminant
impl Sync for Discriminant
impl Unpin for Discriminant
impl UnwindSafe for Discriminant
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: Copy,
impl<T> CloneToUninit for Twhere
T: Copy,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)