Struct synthez_core::Required[][src]

pub struct Required<T>(_);
Expand description

Container requiring a field to have a value mandatory.

It’s similar to Option but panics directly on accessing to the underlying value, if it’s not present.

Accessing the original value is intended to be done via Deref and DerefMut.

Implementations

Unwraps this Required Container returning the underlying value.

Panics

If this Container hasn’t been initialized properly, so contains no value.

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Type of values contained in this Container.

Indicates whether this Container is empty (contains no values).

Indicates whether the provided value is present in this Container.

Replaces the value contained in this Container with the provided one, and returns the replaced one, if any. Read more

Sets the provided value into this Container, dropping the previous one, if any. Read more

Formats the value using the given formatter. Read more

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

The resulting type after dereferencing.

Dereferences the value.

Mutably dereferences the value.

The type of the elements being iterated over.

Which kind of iterator are we turning this into?

Creates an iterator from a value. Read more

The type of the elements being iterated over.

Which kind of iterator are we turning this into?

Creates an iterator from a value. Read more

The type of the elements being iterated over.

Which kind of iterator are we turning this into?

Creates an iterator from a value. Read more

Applies the provided value to this field::Container. Read more

Applies the provided value to this field::Container. Read more

Applies the provided value to this field::Container. Read more

Applies the value extracted from another field::Container to this field::Container. Read more

Checks whether the validation Rule is satisfied. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

The resulting type after obtaining ownership.

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

🔬 This is a nightly-only experimental API. (toowned_clone_into)

recently added

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

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

Merges the provided value to this field::Container with the specified parsing Kind and Deduplication strategy. Read more

Merges the value extracted from another field::Container to this field::Container with the specified parsing Kind and Deduplication strategy. Read more

Checks whether the specified validation Rule is satisfied. Read more