#[repr(i16)]pub enum DraftOrLive {
Draft = 0,
Live = 1,
}
Expand description
Whether the data is draft or live.
Variants§
Implementations§
Source§impl DraftOrLive
impl DraftOrLive
Sourcepub fn is_live(&self) -> bool
pub fn is_live(&self) -> bool
Returns true
for a Self::Live
value.
let x = DraftOrLive::Live;
assert_eq!(x.is_live(), true);
let x = DraftOrLive::Draft;
assert_eq!(x.is_live(), false);
Trait Implementations§
Source§impl Clone for DraftOrLive
impl Clone for DraftOrLive
Source§fn clone(&self) -> DraftOrLive
fn clone(&self) -> DraftOrLive
Returns a copy of the value. Read more
1.0.0 · 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 DraftOrLive
impl Debug for DraftOrLive
Source§impl Default for DraftOrLive
impl Default for DraftOrLive
Source§impl<'de> Deserialize<'de> for DraftOrLive
impl<'de> Deserialize<'de> for DraftOrLive
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 From<DraftOrLive> for bool
impl From<DraftOrLive> for bool
Source§fn from(draft_or_live: DraftOrLive) -> Self
fn from(draft_or_live: DraftOrLive) -> Self
Converts to this type from the input type.
Source§impl From<bool> for DraftOrLive
impl From<bool> for DraftOrLive
Source§impl FromStr for DraftOrLive
impl FromStr for DraftOrLive
Source§impl Serialize for DraftOrLive
impl Serialize for DraftOrLive
impl Copy for DraftOrLive
Auto Trait Implementations§
impl Freeze for DraftOrLive
impl RefUnwindSafe for DraftOrLive
impl Send for DraftOrLive
impl Sync for DraftOrLive
impl Unpin for DraftOrLive
impl UnwindSafe for DraftOrLive
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