pub enum Nullable<T> {
Unchanged,
Null,
Value(T),
}Expand description
Three-state type for PATCH request fields.
The Paddle API uses PATCH semantics where omitting a field means “don’t change”,
sending null means “clear the value”, and sending a value means “set to this value”.
Unchanged- Field will be omitted from serialization (no change)Null- Field will be serialized asnull(clear the value)Value(T)- Field will be serialized as the contained value
Variants§
Implementations§
Trait Implementations§
Source§impl<T: PartialEq> PartialEq for Nullable<T>
impl<T: PartialEq> PartialEq for Nullable<T>
impl<T> StructuralPartialEq for Nullable<T>
Auto Trait Implementations§
impl<T> Freeze for Nullable<T>where
T: Freeze,
impl<T> RefUnwindSafe for Nullable<T>where
T: RefUnwindSafe,
impl<T> Send for Nullable<T>where
T: Send,
impl<T> Sync for Nullable<T>where
T: Sync,
impl<T> Unpin for Nullable<T>where
T: Unpin,
impl<T> UnsafeUnpin for Nullable<T>where
T: UnsafeUnpin,
impl<T> UnwindSafe for Nullable<T>where
T: 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