Struct json_schema::JSONSchemaObjectBuilder

source ·
pub struct JSONSchemaObjectBuilder { /* private fields */ }
Expand description

Builder for JSONSchemaObject.

Implementations§

source§

impl JSONSchemaObjectBuilder

source

pub fn id(&mut self, value: Id) -> &mut Self

source

pub fn schema(&mut self, value: Schema) -> &mut Self

source

pub fn _ref(&mut self, value: Ref) -> &mut Self

source

pub fn comment(&mut self, value: Comment) -> &mut Self

source

pub fn title(&mut self, value: Title) -> &mut Self

source

pub fn description(&mut self, value: Description) -> &mut Self

source

pub fn _default(&mut self, value: Value) -> &mut Self

source

pub fn read_only(&mut self, value: ReadOnly) -> &mut Self

source

pub fn examples(&mut self, value: Examples) -> &mut Self

source

pub fn multiple_of(&mut self, value: MultipleOf) -> &mut Self

source

pub fn maximum(&mut self, value: Maximum) -> &mut Self

source

pub fn exclusive_maximum(&mut self, value: ExclusiveMaximum) -> &mut Self

source

pub fn minimum(&mut self, value: Minimum) -> &mut Self

source

pub fn exclusive_minimum(&mut self, value: ExclusiveMinimum) -> &mut Self

source

pub fn max_length(&mut self, value: NonNegativeInteger) -> &mut Self

source

pub fn min_length(&mut self, value: NonNegativeIntegerDefaultZero) -> &mut Self

source

pub fn pattern(&mut self, value: Pattern) -> &mut Self

source

pub fn additional_items(&mut self, value: Box<JSONSchema>) -> &mut Self

source

pub fn items(&mut self, value: Items) -> &mut Self

source

pub fn max_items(&mut self, value: NonNegativeInteger) -> &mut Self

source

pub fn min_items(&mut self, value: NonNegativeIntegerDefaultZero) -> &mut Self

source

pub fn unique_items(&mut self, value: UniqueItems) -> &mut Self

source

pub fn contains(&mut self, value: Box<JSONSchema>) -> &mut Self

source

pub fn max_properties(&mut self, value: NonNegativeInteger) -> &mut Self

source

pub fn min_properties( &mut self, value: NonNegativeIntegerDefaultZero ) -> &mut Self

source

pub fn required(&mut self, value: StringArray) -> &mut Self

source

pub fn additional_properties(&mut self, value: Box<JSONSchema>) -> &mut Self

source

pub fn definitions(&mut self, value: Definitions) -> &mut Self

source

pub fn properties(&mut self, value: Properties) -> &mut Self

source

pub fn pattern_properties(&mut self, value: PatternProperties) -> &mut Self

source

pub fn dependencies(&mut self, value: Dependencies) -> &mut Self

source

pub fn property_names(&mut self, value: Box<JSONSchema>) -> &mut Self

source

pub fn _const(&mut self, value: Value) -> &mut Self

source

pub fn _enum(&mut self, value: Enum) -> &mut Self

source

pub fn _type(&mut self, value: Type) -> &mut Self

source

pub fn format(&mut self, value: Format) -> &mut Self

source

pub fn content_media_type(&mut self, value: ContentMediaType) -> &mut Self

source

pub fn content_encoding(&mut self, value: ContentEncoding) -> &mut Self

source

pub fn _if(&mut self, value: Box<JSONSchema>) -> &mut Self

source

pub fn then(&mut self, value: Box<JSONSchema>) -> &mut Self

source

pub fn _else(&mut self, value: Box<JSONSchema>) -> &mut Self

source

pub fn all_of(&mut self, value: SchemaArray) -> &mut Self

source

pub fn any_of(&mut self, value: SchemaArray) -> &mut Self

source

pub fn one_of(&mut self, value: SchemaArray) -> &mut Self

source

pub fn not(&mut self, value: Box<JSONSchema>) -> &mut Self

source

pub fn build(&self) -> Result<JSONSchemaObject, JSONSchemaObjectBuilderError>

Builds a new JSONSchemaObject.

§Errors

If a required field has not been initialized.

Trait Implementations§

source§

impl Clone for JSONSchemaObjectBuilder

source§

fn clone(&self) -> JSONSchemaObjectBuilder

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Default for JSONSchemaObjectBuilder

source§

fn default() -> Self

Returns the “default value” for a type. Read more

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T> ToOwned for T
where T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.