pub enum FieldTy {
Str,
Int,
Bool,
Float,
Newtype(String, Box<FieldTy>),
Undecodable(String),
}Expand description
A field’s type, resolved through however many newtypes wrap it.
“A newtype is transparent on the wire and nominal in the type system” — the whole point of §3.1’s “ids of different entities must not be interchangeable” — so the wrappers are recorded in the order they have to be rebuilt.
Variants§
Str
Int
Bool
Float
Newtype(String, Box<FieldTy>)
Id(value=<inner>).
Undecodable(String)
A type the wire format has no encoding for. Carried rather than dropped so the refusal names it, and so a bundle built for a program with one is not silently missing a field.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for FieldTy
impl<'de> Deserialize<'de> for FieldTy
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
impl Eq for FieldTy
impl StructuralPartialEq for FieldTy
Auto Trait Implementations§
impl Freeze for FieldTy
impl RefUnwindSafe for FieldTy
impl Send for FieldTy
impl Sync for FieldTy
impl Unpin for FieldTy
impl UnwindSafe for FieldTy
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