pub enum OptionEnum {
Some(Box<Enum>),
None(EnumTypeName),
}Variantsยง
Some(Box<Enum>)
None(EnumTypeName)
Implementationsยง
Sourceยงimpl OptionEnum
impl OptionEnum
Sourcepub fn is_some(&self) -> bool
pub fn is_some(&self) -> bool
Check if an enum value is set
use sea_query::{Enum, EnumTypeName, OptionEnum};
let type_name: EnumTypeName = "Test".into();
assert_eq!(false, OptionEnum::None(type_name.clone()).is_some());
assert_eq!(
true,
OptionEnum::Some(Box::new(Enum {
type_name,
value: "Foo".into()
}))
.is_some()
);Trait Implementationsยง
Sourceยงimpl Clone for OptionEnum
impl Clone for OptionEnum
Sourceยงfn clone(&self) -> OptionEnum
fn clone(&self) -> OptionEnum
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) ยท Sourceยงfn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSourceยงimpl Debug for OptionEnum
impl Debug for OptionEnum
Sourceยงimpl<'de> Deserialize<'de> for OptionEnum
Available on crate feature serde only.
impl<'de> Deserialize<'de> for OptionEnum
Available on crate feature
serde only.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
impl Eq for OptionEnum
Sourceยงimpl Hash for OptionEnum
impl Hash for OptionEnum
Sourceยงimpl PartialEq for OptionEnum
impl PartialEq for OptionEnum
Sourceยงimpl Serialize for OptionEnum
Available on crate feature serde only.
impl Serialize for OptionEnum
Available on crate feature
serde only.impl StructuralPartialEq for OptionEnum
Auto Trait Implementationsยง
impl Freeze for OptionEnum
impl RefUnwindSafe for OptionEnum
impl Send for OptionEnum
impl Sync for OptionEnum
impl Unpin for OptionEnum
impl UnsafeUnpin for OptionEnum
impl UnwindSafe for OptionEnum
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