pub enum Field<Minimal, Full> {
Minimal(Minimal),
Full(Full),
}
Expand description
Field with multiple representations
GitHub truncates data types in some API responses and webhook events to reduce the payload size.
The Field
enum represents fields in responses that have different representations based on
context.
Variants§
Trait Implementations§
Source§impl<'de, Minimal, Full> Deserialize<'de> for Field<Minimal, Full>where
Minimal: Deserialize<'de>,
Full: Deserialize<'de>,
impl<'de, Minimal, Full> Deserialize<'de> for Field<Minimal, Full>where
Minimal: Deserialize<'de>,
Full: Deserialize<'de>,
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<Minimal: Ord, Full: Ord> Ord for Field<Minimal, Full>
impl<Minimal: Ord, Full: Ord> Ord for Field<Minimal, Full>
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<Minimal: PartialOrd, Full: PartialOrd> PartialOrd for Field<Minimal, Full>
impl<Minimal: PartialOrd, Full: PartialOrd> PartialOrd for Field<Minimal, Full>
impl<Minimal: Copy, Full: Copy> Copy for Field<Minimal, Full>
impl<Minimal: Eq, Full: Eq> Eq for Field<Minimal, Full>
impl<Minimal, Full> StructuralPartialEq for Field<Minimal, Full>
Auto Trait Implementations§
impl<Minimal, Full> Freeze for Field<Minimal, Full>
impl<Minimal, Full> RefUnwindSafe for Field<Minimal, Full>where
Minimal: RefUnwindSafe,
Full: RefUnwindSafe,
impl<Minimal, Full> Send for Field<Minimal, Full>
impl<Minimal, Full> Sync for Field<Minimal, Full>
impl<Minimal, Full> Unpin for Field<Minimal, Full>
impl<Minimal, Full> UnwindSafe for Field<Minimal, Full>where
Minimal: UnwindSafe,
Full: UnwindSafe,
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<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.