Enum trustfall_core::ir::value::TransparentValue
source · #[non_exhaustive]pub enum TransparentValue {
Null,
Int64(i64),
Uint64(u64),
Float64(f64),
String(Arc<str>),
Boolean(bool),
Enum(Arc<str>),
List(Arc<[TransparentValue]>),
}
Expand description
Values of fields in GraphQL types.
Same as FieldValue, but serialized as an untagged enum, which may be more suitable e.g. when serializing to JSON.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Null
Int64(i64)
Together with Uint64
, corresponds to schemas’ Int
type.
Uint64(u64)
Together with Int64
, corresponds to schemas’ Int
type.
Float64(f64)
Corresponds to schemas’ Float
type. Not allowed to be NaN or infinite.
String(Arc<str>)
Boolean(bool)
Enum(Arc<str>)
List(Arc<[TransparentValue]>)
Trait Implementations§
source§impl Clone for TransparentValue
impl Clone for TransparentValue
source§fn clone(&self) -> TransparentValue
fn clone(&self) -> TransparentValue
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 TransparentValue
impl Debug for TransparentValue
source§impl Default for TransparentValue
impl Default for TransparentValue
source§fn default() -> TransparentValue
fn default() -> TransparentValue
Returns the “default value” for a type. Read more
source§impl<'de> Deserialize<'de> for TransparentValue
impl<'de> Deserialize<'de> for TransparentValue
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<FieldValue> for TransparentValue
impl From<FieldValue> for TransparentValue
source§fn from(value: FieldValue) -> Self
fn from(value: FieldValue) -> Self
Converts to this type from the input type.
source§impl From<TransparentValue> for FieldValue
impl From<TransparentValue> for FieldValue
source§fn from(value: TransparentValue) -> Self
fn from(value: TransparentValue) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl RefUnwindSafe for TransparentValue
impl Send for TransparentValue
impl Sync for TransparentValue
impl Unpin for TransparentValue
impl UnwindSafe for TransparentValue
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