Struct rustdoc_json_types::Discriminant
source · pub struct Discriminant {
pub expr: String,
pub value: String,
}
Fields§
§expr: String
The expression that produced the discriminant.
Unlike value
, this preserves the original formatting (eg suffixes,
hexadecimal, and underscores), making it unsuitable to be machine
interpreted.
In some cases, when the value is to complex, this may be "{ _ }"
.
When this occurs is unstable, and may change without notice.
value: String
The numerical value of the discriminant. Stored as a string due to
JSON’s poor support for large integers, and the fact that it would need
to store from i128::MIN
to u128::MAX
.
Trait Implementations§
source§impl Clone for Discriminant
impl Clone for Discriminant
source§fn clone(&self) -> Discriminant
fn clone(&self) -> Discriminant
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
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>,
source§impl Hash for Discriminant
impl Hash for Discriminant
source§impl PartialEq<Discriminant> for Discriminant
impl PartialEq<Discriminant> for Discriminant
source§fn eq(&self, other: &Discriminant) -> bool
fn eq(&self, other: &Discriminant) -> bool
self
and other
values to be equal, and is used
by ==
.source§impl Serialize for Discriminant
impl Serialize for Discriminant
impl Eq for Discriminant
impl StructuralEq for Discriminant
impl StructuralPartialEq for Discriminant
Auto Trait Implementations§
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
impl<T> DeserializeOwned for Twhere T: for<'de> Deserialize<'de>,
Layout§
Note: Most layout information is completely unstable and may even differ between compilations. The only exception is types with certain repr(...)
attributes. Please see the Rust Reference's “Type Layout” chapter for details on type layout guarantees.
Size: 48 bytes