pub enum ObjectClosure {
RejectOpenObjects = 0,
AssumeClosedProfile = 1,
Forbidden = 2,
AllowOpenProfile = 3,
}Expand description
How an object treats properties not named in fields. Discriminant is the stable code.
Variants§
RejectOpenObjects = 0
An open object (absent or non-false additional properties); rejected at compile.
AssumeClosedProfile = 1
The caller opted in to generating as a closed object.
Forbidden = 2
additionalProperties: false stated by the schema itself.
AllowOpenProfile = 3
Default: absent additionalProperties compiles as truly open (spec-correct additionalProperties:true), not rejected.
Trait Implementations§
Source§impl<'__de, __Context> BorrowDecode<'__de, __Context> for ObjectClosure
impl<'__de, __Context> BorrowDecode<'__de, __Context> for ObjectClosure
Source§fn borrow_decode<__D: BorrowDecoder<'__de, Context = __Context>>(
decoder: &mut __D,
) -> Result<Self, DecodeError>
fn borrow_decode<__D: BorrowDecoder<'__de, Context = __Context>>( decoder: &mut __D, ) -> Result<Self, DecodeError>
Attempt to decode this type with the given BorrowDecode.
Source§impl Clone for ObjectClosure
impl Clone for ObjectClosure
impl Copy for ObjectClosure
Source§impl Debug for ObjectClosure
impl Debug for ObjectClosure
Source§impl<__Context> Decode<__Context> for ObjectClosure
impl<__Context> Decode<__Context> for ObjectClosure
Source§impl Encode for ObjectClosure
impl Encode for ObjectClosure
impl Eq for ObjectClosure
Source§impl Hash for ObjectClosure
impl Hash for ObjectClosure
Source§impl PartialEq for ObjectClosure
impl PartialEq for ObjectClosure
impl StructuralPartialEq for ObjectClosure
Auto Trait Implementations§
impl Freeze for ObjectClosure
impl RefUnwindSafe for ObjectClosure
impl Send for ObjectClosure
impl Sync for ObjectClosure
impl Unpin for ObjectClosure
impl UnsafeUnpin for ObjectClosure
impl UnwindSafe for ObjectClosure
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