Skip to main content

Item

Enum Item 

Source
pub enum Item {
    ReferenceItem(ReferenceItemType),
    OneOfItem(OneOfItemType),
    AnyOfItem(AnyOfItemType),
    DataTypeItem(DataTypeItemType),
}

Variants§

§

ReferenceItem(ReferenceItemType)

§

OneOfItem(OneOfItemType)

§

AnyOfItem(AnyOfItemType)

§

DataTypeItem(DataTypeItemType)

Implementations§

Source§

impl Item

Source

pub fn reference_item(self) -> Option<ReferenceItemType>

Source

pub fn reference_item_ref(&self) -> Option<&ReferenceItemType>

Source

pub fn reference_item_mut(&mut self) -> Option<&mut ReferenceItemType>

Source

pub fn reference_item_or<E>(self, or: E) -> Result<ReferenceItemType, E>

Source

pub fn reference_item_or_else<E, F: FnOnce() -> E>( self, or_else: F, ) -> Result<ReferenceItemType, E>

Source

pub fn reference_item_ref_or<E>(&self, or: E) -> Result<&ReferenceItemType, E>

Source

pub fn reference_item_mut_or<E>( &mut self, or: E, ) -> Result<&mut ReferenceItemType, E>

Source

pub fn reference_item_ref_or_else<E, F: FnOnce() -> E>( &self, or_else: F, ) -> Result<&ReferenceItemType, E>

Source

pub fn reference_item_mut_or_else<E, F: FnOnce() -> E>( &mut self, or_else: F, ) -> Result<&mut ReferenceItemType, E>

Source

pub fn and_then_reference_item<F: FnOnce(ReferenceItemType) -> ReferenceItemType>( self, and_then: F, ) -> Self

Source

pub fn expect_reference_item(self, msg: &str) -> ReferenceItemType

Source

pub fn ok_reference_item(self) -> Option<ReferenceItemType>

👎Deprecated since 0.2.0: Please use the derived Item::reference_item method instead. This method will be removed in 1.0.0 or next pre-stable minor bump.
Source

pub fn ok_or_reference_item<E>(self, or: E) -> Result<ReferenceItemType, E>

👎Deprecated since 0.2.0: Please use the derived Item::reference_item_or method instead. This method will be removed in 1.0.0 or next pre-stable minor bump.
Source

pub fn ok_or_else_reference_item<E, F: FnOnce() -> E>( self, or_else: F, ) -> Result<ReferenceItemType, E>

👎Deprecated since 0.2.0: Please use the derived Item::reference_item_or_else method instead. This method will be removed in 1.0.0 or next pre-stable minor bump.
Source

pub fn or_else_reference_item<F: FnOnce() -> ReferenceItemType>( self, or_else: F, ) -> Self

Source

pub fn unwrap_reference_item(self) -> ReferenceItemType

Source

pub fn unwrap_or_reference_item( self, or: ReferenceItemType, ) -> ReferenceItemType

Source

pub fn unwrap_or_else_reference_item<F: FnOnce() -> ReferenceItemType>( self, or_else: F, ) -> ReferenceItemType

Source

pub fn is_reference_item(&self) -> bool

Source

pub fn is_not_reference_item(&self) -> bool

Source

pub fn and_reference_item(self, and: Self) -> Self

Source

pub fn or_reference_item(self, or: Self) -> Self

Source

pub fn one_of_item(self) -> Option<OneOfItemType>

Source

pub fn one_of_item_ref(&self) -> Option<&OneOfItemType>

Source

pub fn one_of_item_mut(&mut self) -> Option<&mut OneOfItemType>

Source

pub fn one_of_item_or<E>(self, or: E) -> Result<OneOfItemType, E>

Source

pub fn one_of_item_or_else<E, F: FnOnce() -> E>( self, or_else: F, ) -> Result<OneOfItemType, E>

Source

pub fn one_of_item_ref_or<E>(&self, or: E) -> Result<&OneOfItemType, E>

Source

pub fn one_of_item_mut_or<E>(&mut self, or: E) -> Result<&mut OneOfItemType, E>

Source

pub fn one_of_item_ref_or_else<E, F: FnOnce() -> E>( &self, or_else: F, ) -> Result<&OneOfItemType, E>

Source

pub fn one_of_item_mut_or_else<E, F: FnOnce() -> E>( &mut self, or_else: F, ) -> Result<&mut OneOfItemType, E>

Source

pub fn and_then_one_of_item<F: FnOnce(OneOfItemType) -> OneOfItemType>( self, and_then: F, ) -> Self

Source

pub fn expect_one_of_item(self, msg: &str) -> OneOfItemType

Source

pub fn ok_one_of_item(self) -> Option<OneOfItemType>

👎Deprecated since 0.2.0: Please use the derived Item::one_of_item method instead. This method will be removed in 1.0.0 or next pre-stable minor bump.
Source

pub fn ok_or_one_of_item<E>(self, or: E) -> Result<OneOfItemType, E>

👎Deprecated since 0.2.0: Please use the derived Item::one_of_item_or method instead. This method will be removed in 1.0.0 or next pre-stable minor bump.
Source

pub fn ok_or_else_one_of_item<E, F: FnOnce() -> E>( self, or_else: F, ) -> Result<OneOfItemType, E>

👎Deprecated since 0.2.0: Please use the derived Item::one_of_item_or_else method instead. This method will be removed in 1.0.0 or next pre-stable minor bump.
Source

pub fn or_else_one_of_item<F: FnOnce() -> OneOfItemType>( self, or_else: F, ) -> Self

Source

pub fn unwrap_one_of_item(self) -> OneOfItemType

Source

pub fn unwrap_or_one_of_item(self, or: OneOfItemType) -> OneOfItemType

Source

pub fn unwrap_or_else_one_of_item<F: FnOnce() -> OneOfItemType>( self, or_else: F, ) -> OneOfItemType

Source

pub fn is_one_of_item(&self) -> bool

Source

pub fn is_not_one_of_item(&self) -> bool

Source

pub fn and_one_of_item(self, and: Self) -> Self

Source

pub fn or_one_of_item(self, or: Self) -> Self

Source

pub fn any_of_item(self) -> Option<AnyOfItemType>

Source

pub fn any_of_item_ref(&self) -> Option<&AnyOfItemType>

Source

pub fn any_of_item_mut(&mut self) -> Option<&mut AnyOfItemType>

Source

pub fn any_of_item_or<E>(self, or: E) -> Result<AnyOfItemType, E>

Source

pub fn any_of_item_or_else<E, F: FnOnce() -> E>( self, or_else: F, ) -> Result<AnyOfItemType, E>

Source

pub fn any_of_item_ref_or<E>(&self, or: E) -> Result<&AnyOfItemType, E>

Source

pub fn any_of_item_mut_or<E>(&mut self, or: E) -> Result<&mut AnyOfItemType, E>

Source

pub fn any_of_item_ref_or_else<E, F: FnOnce() -> E>( &self, or_else: F, ) -> Result<&AnyOfItemType, E>

Source

pub fn any_of_item_mut_or_else<E, F: FnOnce() -> E>( &mut self, or_else: F, ) -> Result<&mut AnyOfItemType, E>

Source

pub fn and_then_any_of_item<F: FnOnce(AnyOfItemType) -> AnyOfItemType>( self, and_then: F, ) -> Self

Source

pub fn expect_any_of_item(self, msg: &str) -> AnyOfItemType

Source

pub fn ok_any_of_item(self) -> Option<AnyOfItemType>

👎Deprecated since 0.2.0: Please use the derived Item::any_of_item method instead. This method will be removed in 1.0.0 or next pre-stable minor bump.
Source

pub fn ok_or_any_of_item<E>(self, or: E) -> Result<AnyOfItemType, E>

👎Deprecated since 0.2.0: Please use the derived Item::any_of_item_or method instead. This method will be removed in 1.0.0 or next pre-stable minor bump.
Source

pub fn ok_or_else_any_of_item<E, F: FnOnce() -> E>( self, or_else: F, ) -> Result<AnyOfItemType, E>

👎Deprecated since 0.2.0: Please use the derived Item::any_of_item_or_else method instead. This method will be removed in 1.0.0 or next pre-stable minor bump.
Source

pub fn or_else_any_of_item<F: FnOnce() -> AnyOfItemType>( self, or_else: F, ) -> Self

Source

pub fn unwrap_any_of_item(self) -> AnyOfItemType

Source

pub fn unwrap_or_any_of_item(self, or: AnyOfItemType) -> AnyOfItemType

Source

pub fn unwrap_or_else_any_of_item<F: FnOnce() -> AnyOfItemType>( self, or_else: F, ) -> AnyOfItemType

Source

pub fn is_any_of_item(&self) -> bool

Source

pub fn is_not_any_of_item(&self) -> bool

Source

pub fn and_any_of_item(self, and: Self) -> Self

Source

pub fn or_any_of_item(self, or: Self) -> Self

Source

pub fn data_type_item(self) -> Option<DataTypeItemType>

Source

pub fn data_type_item_ref(&self) -> Option<&DataTypeItemType>

Source

pub fn data_type_item_mut(&mut self) -> Option<&mut DataTypeItemType>

Source

pub fn data_type_item_or<E>(self, or: E) -> Result<DataTypeItemType, E>

Source

pub fn data_type_item_or_else<E, F: FnOnce() -> E>( self, or_else: F, ) -> Result<DataTypeItemType, E>

Source

pub fn data_type_item_ref_or<E>(&self, or: E) -> Result<&DataTypeItemType, E>

Source

pub fn data_type_item_mut_or<E>( &mut self, or: E, ) -> Result<&mut DataTypeItemType, E>

Source

pub fn data_type_item_ref_or_else<E, F: FnOnce() -> E>( &self, or_else: F, ) -> Result<&DataTypeItemType, E>

Source

pub fn data_type_item_mut_or_else<E, F: FnOnce() -> E>( &mut self, or_else: F, ) -> Result<&mut DataTypeItemType, E>

Source

pub fn and_then_data_type_item<F: FnOnce(DataTypeItemType) -> DataTypeItemType>( self, and_then: F, ) -> Self

Source

pub fn expect_data_type_item(self, msg: &str) -> DataTypeItemType

Source

pub fn ok_data_type_item(self) -> Option<DataTypeItemType>

👎Deprecated since 0.2.0: Please use the derived Item::data_type_item method instead. This method will be removed in 1.0.0 or next pre-stable minor bump.
Source

pub fn ok_or_data_type_item<E>(self, or: E) -> Result<DataTypeItemType, E>

👎Deprecated since 0.2.0: Please use the derived Item::data_type_item_or method instead. This method will be removed in 1.0.0 or next pre-stable minor bump.
Source

pub fn ok_or_else_data_type_item<E, F: FnOnce() -> E>( self, or_else: F, ) -> Result<DataTypeItemType, E>

👎Deprecated since 0.2.0: Please use the derived Item::data_type_item_or_else method instead. This method will be removed in 1.0.0 or next pre-stable minor bump.
Source

pub fn or_else_data_type_item<F: FnOnce() -> DataTypeItemType>( self, or_else: F, ) -> Self

Source

pub fn unwrap_data_type_item(self) -> DataTypeItemType

Source

pub fn unwrap_or_data_type_item(self, or: DataTypeItemType) -> DataTypeItemType

Source

pub fn unwrap_or_else_data_type_item<F: FnOnce() -> DataTypeItemType>( self, or_else: F, ) -> DataTypeItemType

Source

pub fn is_data_type_item(&self) -> bool

Source

pub fn is_not_data_type_item(&self) -> bool

Source

pub fn and_data_type_item(self, and: Self) -> Self

Source

pub fn or_data_type_item(self, or: Self) -> Self

Trait Implementations§

Source§

impl Clone for Item

Source§

fn clone(&self) -> Item

Returns a duplicate 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 Debug for Item

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<'de> Deserialize<'de> for Item

Source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl Serialize for Item

Source§

fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
where S: Serializer,

Serialize this value into the given Serde serializer. Read more

Auto Trait Implementations§

§

impl Freeze for Item

§

impl RefUnwindSafe for Item

§

impl Send for Item

§

impl Sync for Item

§

impl Unpin for Item

§

impl UnsafeUnpin for Item

§

impl UnwindSafe for Item

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> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
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> PolicyExt for T
where T: ?Sized,

Source§

fn and<P, B, E>(self, other: P) -> And<T, P>
where T: Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow only if self and other return Action::Follow. Read more
Source§

fn or<P, B, E>(self, other: P) -> Or<T, P>
where T: Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow if either self or other returns Action::Follow. Read more
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

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

Source§

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

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.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V

Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,