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
impl<'de> Deserialize<'de> for OptionEnum
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
Sourceยงimpl Hash for OptionEnum
impl Hash for OptionEnum
Sourceยงimpl PartialEq for OptionEnum
impl PartialEq for OptionEnum
Sourceยงfn eq(&self, other: &OptionEnum) -> bool
fn eq(&self, other: &OptionEnum) -> bool
Tests for
self and other values to be equal, and is used by ==.Sourceยงimpl Serialize for OptionEnum
impl Serialize for OptionEnum
impl Eq for OptionEnum
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