pub enum ObjectDefinition {
Strict(Vec<ObjectProperty>),
Arbitrary(Option<Vec<ObjectProperty>>),
Tuple(Vec<ObjectProperty>),
Enum(Vec<ObjectProperty>),
}Variants§
Strict(Vec<ObjectProperty>)
Strict object definition with a list of properties
Arbitrary(Option<Vec<ObjectProperty>>)
Arbitrary object definition with no specific properties The optional list of object properties is used for documenting Some of the potential properties.
Tuple(Vec<ObjectProperty>)
Tuple variant for representing tuple types. This means that the ‘name’ field will be ignored. Instead, the index of the property will be used to create the tuple.
Enum(Vec<ObjectProperty>)
Enum variant for representing enum types. This means that the value will have one of the specified properties.
Implementations§
Source§impl ObjectDefinition
impl ObjectDefinition
pub fn strict(props: Vec<ObjectProperty>) -> Self
pub fn arbitrary() -> Self
pub fn documented_arbitrary(props: Vec<ObjectProperty>) -> Self
pub fn tuple(props: Vec<ObjectProperty>) -> Self
pub fn enum_type(props: Vec<ObjectProperty>) -> Self
pub fn join_documentation(&self, recursion_depth: usize) -> String
Trait Implementations§
Source§impl Clone for ObjectDefinition
impl Clone for ObjectDefinition
Source§fn clone(&self) -> ObjectDefinition
fn clone(&self) -> ObjectDefinition
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ObjectDefinition
impl Debug for ObjectDefinition
Source§impl Hash for ObjectDefinition
impl Hash for ObjectDefinition
Source§impl PartialEq for ObjectDefinition
impl PartialEq for ObjectDefinition
impl Eq for ObjectDefinition
impl StructuralPartialEq for ObjectDefinition
Auto Trait Implementations§
impl Freeze for ObjectDefinition
impl RefUnwindSafe for ObjectDefinition
impl Send for ObjectDefinition
impl Sync for ObjectDefinition
impl Unpin for ObjectDefinition
impl UnwindSafe for ObjectDefinition
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> 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.