WriteOnly

Struct WriteOnly 

Source
pub struct WriteOnly<Inner> { /* private fields */ }
Expand description

A typetag for a write-only DataSchema builder.

Trait Implementations§

Source§

impl<DS, AS, OS, Inner> BuildableDataSchema<DS, AS, OS, Extended> for WriteOnly<Inner>
where Inner: BuildableDataSchema<DS, AS, OS, Extended>,

Source§

fn unit(self, value: impl Into<String>) -> Self

Sets the value of the unit field.
Source§

fn format(self, value: impl Into<String>) -> Self

Sets the value of the format field.
Source§

fn default_value(self, value: impl Into<Value>) -> Self

Sets the value of the default field.
Source§

impl<Inner: BuildableHumanReadableInfo> BuildableHumanReadableInfo for WriteOnly<Inner>

Source§

fn attype(self, value: impl Into<String>) -> Self

Set JSON-LD @type Read more
Source§

fn title(self, value: impl Into<String>) -> Self

Set the title Read more
Source§

fn titles<F>(self, f: F) -> Self

Set the translations of the title Read more
Source§

fn description(self, value: impl Into<String>) -> Self

Set the description Read more
Source§

fn descriptions<F>(self, f: F) -> Self

Set the translations of the description Read more
Source§

impl<Inner, DS, AS, OS> EnumerableDataSchema<DS, AS, OS, Extended> for WriteOnly<Inner>
where Inner: EnumerableDataSchema<DS, AS, OS, Extended>,

Source§

type Target = WriteOnly<<Inner as EnumerableDataSchema<DS, AS, OS, Extended>>::Target>

The enumeration specialization of the data schema builder.
Source§

fn enumeration(self, value: impl Into<Value>) -> Self::Target

Returns a specialized enumeration data schema and adds a variant to the enumeration field. It can be implemented for specialized enumeration data schemas. Read more
Source§

impl<T, DS, AS, OS> From<WriteOnly<T>> for DataSchemaBuilder<DS, AS, OS, Extended>
where T: Into<DataSchemaBuilder<DS, AS, OS, Extended>>,

Source§

fn from(data_schema: WriteOnly<T>) -> Self

Converts to this type from the input type.
Source§

impl<T, DS, AS, OS> From<WriteOnly<T>> for PartialDataSchema<DS, AS, OS>
where T: Into<PartialDataSchema<DS, AS, OS>>,

Source§

fn from(builder: WriteOnly<T>) -> Self

Converts to this type from the input type.
Source§

impl<T, DS, AS, OS> From<WriteOnly<T>> for PartialDataSchemaBuilder<DS, AS, OS, Extended>
where T: Into<PartialDataSchemaBuilder<DS, AS, OS, Extended>>,

Source§

fn from(data_schema: WriteOnly<T>) -> Self

Converts to this type from the input type.
Source§

impl<T, DS, AS, OS> From<WriteOnly<T>> for UncheckedDataSchema<DS, AS, OS>
where T: Into<UncheckedDataSchema<DS, AS, OS>>,

Source§

fn from(builder: WriteOnly<T>) -> Self

Converts to this type from the input type.
Source§

impl<DS, AS, OS, Innner: IntegerDataSchemaBuilderLike<DS, AS, OS>> IntegerDataSchemaBuilderLike<DS, AS, OS> for WriteOnly<Innner>

Source§

fn minimum(self, value: i64) -> Self

Sets the value of the minimum field.
Source§

fn maximum(self, value: i64) -> Self

Sets the value of the maximum field.
Source§

fn exclusive_minimum(self, value: i64) -> Self

Sets the value of the exclusive_minimum field.
Source§

fn exclusive_maximum(self, value: i64) -> Self

Sets the value of the exclusive_maximum field.
Source§

fn multiple_of(self, value: NonZeroU64) -> Self

Sets the value of the multiple_of field.
Source§

impl<DS, AS, OS, Innner: NumberDataSchemaBuilderLike<DS, AS, OS>> NumberDataSchemaBuilderLike<DS, AS, OS> for WriteOnly<Innner>

Source§

fn minimum(self, value: f64) -> Self

Sets the value of the minimum field.
Source§

fn maximum(self, value: f64) -> Self

Sets the value of the maximum field.
Source§

fn exclusive_minimum(self, value: f64) -> Self

Sets the value of the exclusive_minimum field.
Source§

fn exclusive_maximum(self, value: f64) -> Self

Sets the value of the exclusive_maximum field.
Source§

fn multiple_of(self, value: f64) -> Self

Sets the value of the multiple_of field.
Source§

impl<DS, AS, OS, Innner: ObjectDataSchemaBuilderLike<DS, AS, OS>> ObjectDataSchemaBuilderLike<DS, AS, OS> for WriteOnly<Innner>

Source§

fn property<F, T>(self, name: impl Into<String>, required: bool, f: F) -> Self
where F: FnOnce(DataSchemaBuilder<<DS as Extendable>::Empty, AS, OS, ToExtend>) -> T, DS: Extendable, T: Into<UncheckedDataSchema<DS, AS, OS>>,

Add a new property to the object. Read more
Source§

impl<T, DS, AS, OS> TryFrom<WriteOnly<T>> for DataSchema<DS, AS, OS>
where T: Into<UncheckedDataSchema<DS, AS, OS>>,

Source§

type Error = Error

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

fn try_from(value: WriteOnly<T>) -> Result<Self, Self::Error>

Performs the conversion.
Source§

impl<DS, AS, OS, Innner: TupleDataSchemaBuilderLike<DS, AS, OS>> TupleDataSchemaBuilderLike<DS, AS, OS> for WriteOnly<Innner>

Source§

fn append<F, T>(self, f: F) -> Self
where F: FnOnce(DataSchemaBuilder<<DS as Extendable>::Empty, AS, OS, ToExtend>) -> T, DS: Extendable, T: Into<UncheckedDataSchema<DS, AS, OS>>,

Append an element to the tuple of inner data schemas. Read more
Source§

impl<Inner, DS, AS, OS> UnionDataSchema<DS, AS, OS> for WriteOnly<Inner>
where Inner: UnionDataSchema<DS, AS, OS>,

Source§

type Target = WriteOnly<<Inner as UnionDataSchema<DS, AS, OS>>::Target>

The union specialization of the data schema builder.
Source§

fn one_of<F, T>(self, f: F) -> Self::Target
where F: FnOnce(DataSchemaBuilder<<DS as Extendable>::Empty, AS, OS, ToExtend>) -> T, DS: Extendable, T: Into<UncheckedDataSchema<DS, AS, OS>>,

Returns a specialized union data schema and adds a data schema to the one_of field. It can be implemented for specialized one_of data schemas. Read more
Source§

impl<DS, AS, OS, Innner: VecDataSchemaBuilderLike<DS, AS, OS>> VecDataSchemaBuilderLike<DS, AS, OS> for WriteOnly<Innner>

Source§

fn min_items(self, value: u32) -> Self

Sets the value of the min_items field.
Source§

fn max_items(self, value: u32) -> Self

Sets the value of the max_items field.
Source§

fn set_item<F, T>(self, f: F) -> Self
where F: FnOnce(DataSchemaBuilder<<DS as Extendable>::Empty, AS, OS, ToExtend>) -> T, DS: Extendable, T: Into<UncheckedDataSchema<DS, AS, OS>>,

Sets the data schema of the underlying type. Read more

Auto Trait Implementations§

§

impl<Inner> Freeze for WriteOnly<Inner>
where Inner: Freeze,

§

impl<Inner> RefUnwindSafe for WriteOnly<Inner>
where Inner: RefUnwindSafe,

§

impl<Inner> Send for WriteOnly<Inner>
where Inner: Send,

§

impl<Inner> Sync for WriteOnly<Inner>
where Inner: Sync,

§

impl<Inner> Unpin for WriteOnly<Inner>
where Inner: Unpin,

§

impl<Inner> UnwindSafe for WriteOnly<Inner>
where Inner: UnwindSafe,

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, U> TryFrom<U> for T
where U: Into<T>,

Source§

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>,

Source§

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.