pub enum Item {
ReferenceItem(ReferenceItemType),
OneOfItem(OneOfItemType),
AnyOfItem(AnyOfItemType),
DataTypeItem(DataTypeItemType),
}Variants§
ReferenceItem(ReferenceItemType)
OneOfItem(OneOfItemType)
AnyOfItem(AnyOfItemType)
DataTypeItem(DataTypeItemType)
Implementations§
Source§impl Item
impl Item
pub fn reference_item(self) -> Option<ReferenceItemType>
pub fn reference_item_ref(&self) -> Option<&ReferenceItemType>
pub fn reference_item_mut(&mut self) -> Option<&mut ReferenceItemType>
pub fn reference_item_or<E>(self, or: E) -> Result<ReferenceItemType, E>
pub fn reference_item_or_else<E, F: FnOnce() -> E>( self, or_else: F, ) -> Result<ReferenceItemType, E>
pub fn reference_item_ref_or<E>(&self, or: E) -> Result<&ReferenceItemType, E>
pub fn reference_item_mut_or<E>( &mut self, or: E, ) -> Result<&mut ReferenceItemType, E>
pub fn reference_item_ref_or_else<E, F: FnOnce() -> E>( &self, or_else: F, ) -> Result<&ReferenceItemType, E>
pub fn reference_item_mut_or_else<E, F: FnOnce() -> E>( &mut self, or_else: F, ) -> Result<&mut ReferenceItemType, E>
pub fn and_then_reference_item<F: FnOnce(ReferenceItemType) -> ReferenceItemType>( self, and_then: F, ) -> Self
pub fn expect_reference_item(self, msg: &str) -> ReferenceItemType
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.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.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.pub fn or_else_reference_item<F: FnOnce() -> ReferenceItemType>( self, or_else: F, ) -> Self
pub fn unwrap_reference_item(self) -> ReferenceItemType
pub fn unwrap_or_reference_item( self, or: ReferenceItemType, ) -> ReferenceItemType
pub fn unwrap_or_else_reference_item<F: FnOnce() -> ReferenceItemType>( self, or_else: F, ) -> ReferenceItemType
pub fn is_reference_item(&self) -> bool
pub fn is_not_reference_item(&self) -> bool
pub fn and_reference_item(self, and: Self) -> Self
pub fn or_reference_item(self, or: Self) -> Self
pub fn one_of_item(self) -> Option<OneOfItemType>
pub fn one_of_item_ref(&self) -> Option<&OneOfItemType>
pub fn one_of_item_mut(&mut self) -> Option<&mut OneOfItemType>
pub fn one_of_item_or<E>(self, or: E) -> Result<OneOfItemType, E>
pub fn one_of_item_or_else<E, F: FnOnce() -> E>( self, or_else: F, ) -> Result<OneOfItemType, E>
pub fn one_of_item_ref_or<E>(&self, or: E) -> Result<&OneOfItemType, E>
pub fn one_of_item_mut_or<E>(&mut self, or: E) -> Result<&mut OneOfItemType, E>
pub fn one_of_item_ref_or_else<E, F: FnOnce() -> E>( &self, or_else: F, ) -> Result<&OneOfItemType, E>
pub fn one_of_item_mut_or_else<E, F: FnOnce() -> E>( &mut self, or_else: F, ) -> Result<&mut OneOfItemType, E>
pub fn and_then_one_of_item<F: FnOnce(OneOfItemType) -> OneOfItemType>( self, and_then: F, ) -> Self
pub fn expect_one_of_item(self, msg: &str) -> OneOfItemType
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.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.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.pub fn or_else_one_of_item<F: FnOnce() -> OneOfItemType>( self, or_else: F, ) -> Self
pub fn unwrap_one_of_item(self) -> OneOfItemType
pub fn unwrap_or_one_of_item(self, or: OneOfItemType) -> OneOfItemType
pub fn unwrap_or_else_one_of_item<F: FnOnce() -> OneOfItemType>( self, or_else: F, ) -> OneOfItemType
pub fn is_one_of_item(&self) -> bool
pub fn is_not_one_of_item(&self) -> bool
pub fn and_one_of_item(self, and: Self) -> Self
pub fn or_one_of_item(self, or: Self) -> Self
pub fn any_of_item(self) -> Option<AnyOfItemType>
pub fn any_of_item_ref(&self) -> Option<&AnyOfItemType>
pub fn any_of_item_mut(&mut self) -> Option<&mut AnyOfItemType>
pub fn any_of_item_or<E>(self, or: E) -> Result<AnyOfItemType, E>
pub fn any_of_item_or_else<E, F: FnOnce() -> E>( self, or_else: F, ) -> Result<AnyOfItemType, E>
pub fn any_of_item_ref_or<E>(&self, or: E) -> Result<&AnyOfItemType, E>
pub fn any_of_item_mut_or<E>(&mut self, or: E) -> Result<&mut AnyOfItemType, E>
pub fn any_of_item_ref_or_else<E, F: FnOnce() -> E>( &self, or_else: F, ) -> Result<&AnyOfItemType, E>
pub fn any_of_item_mut_or_else<E, F: FnOnce() -> E>( &mut self, or_else: F, ) -> Result<&mut AnyOfItemType, E>
pub fn and_then_any_of_item<F: FnOnce(AnyOfItemType) -> AnyOfItemType>( self, and_then: F, ) -> Self
pub fn expect_any_of_item(self, msg: &str) -> AnyOfItemType
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.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.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.pub fn or_else_any_of_item<F: FnOnce() -> AnyOfItemType>( self, or_else: F, ) -> Self
pub fn unwrap_any_of_item(self) -> AnyOfItemType
pub fn unwrap_or_any_of_item(self, or: AnyOfItemType) -> AnyOfItemType
pub fn unwrap_or_else_any_of_item<F: FnOnce() -> AnyOfItemType>( self, or_else: F, ) -> AnyOfItemType
pub fn is_any_of_item(&self) -> bool
pub fn is_not_any_of_item(&self) -> bool
pub fn and_any_of_item(self, and: Self) -> Self
pub fn or_any_of_item(self, or: Self) -> Self
pub fn data_type_item(self) -> Option<DataTypeItemType>
pub fn data_type_item_ref(&self) -> Option<&DataTypeItemType>
pub fn data_type_item_mut(&mut self) -> Option<&mut DataTypeItemType>
pub fn data_type_item_or<E>(self, or: E) -> Result<DataTypeItemType, E>
pub fn data_type_item_or_else<E, F: FnOnce() -> E>( self, or_else: F, ) -> Result<DataTypeItemType, E>
pub fn data_type_item_ref_or<E>(&self, or: E) -> Result<&DataTypeItemType, E>
pub fn data_type_item_mut_or<E>( &mut self, or: E, ) -> Result<&mut DataTypeItemType, E>
pub fn data_type_item_ref_or_else<E, F: FnOnce() -> E>( &self, or_else: F, ) -> Result<&DataTypeItemType, E>
pub fn data_type_item_mut_or_else<E, F: FnOnce() -> E>( &mut self, or_else: F, ) -> Result<&mut DataTypeItemType, E>
pub fn and_then_data_type_item<F: FnOnce(DataTypeItemType) -> DataTypeItemType>( self, and_then: F, ) -> Self
pub fn expect_data_type_item(self, msg: &str) -> DataTypeItemType
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.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.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.pub fn or_else_data_type_item<F: FnOnce() -> DataTypeItemType>( self, or_else: F, ) -> Self
pub fn unwrap_data_type_item(self) -> DataTypeItemType
pub fn unwrap_or_data_type_item(self, or: DataTypeItemType) -> DataTypeItemType
pub fn unwrap_or_else_data_type_item<F: FnOnce() -> DataTypeItemType>( self, or_else: F, ) -> DataTypeItemType
pub fn is_data_type_item(&self) -> bool
pub fn is_not_data_type_item(&self) -> bool
pub fn and_data_type_item(self, and: Self) -> Self
pub fn or_data_type_item(self, or: Self) -> Self
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Item
impl<'de> Deserialize<'de> for Item
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. 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> 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