#[non_exhaustive]pub enum Contract {
Deserialize,
Serialize,
}
Expand description
A setting to specify whether generated schemas should describe how types are serialized or deserialized.
This enum is marked as #[non_exhaustive]
to reserve space to introduce further variants
in future.
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.
Implementations§
Source§impl Contract
impl Contract
Sourcepub fn is_deserialize(&self) -> bool
pub fn is_deserialize(&self) -> bool
Returns true if self
is the Deserialize
contract.
Sourcepub fn is_serialize(&self) -> bool
pub fn is_serialize(&self) -> bool
Returns true if self
is the Serialize
contract.
Trait Implementations§
Source§impl Ord for Contract
impl Ord for Contract
Source§impl PartialOrd for Contract
impl PartialOrd for Contract
impl Eq for Contract
impl StructuralPartialEq for Contract
Auto Trait Implementations§
impl Freeze for Contract
impl RefUnwindSafe for Contract
impl Send for Contract
impl Sync for Contract
impl Unpin for Contract
impl UnwindSafe for Contract
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