pub enum PageStatus {
Draft,
Published,
Scheduled,
}Expand description
Publication status of a Ghost page.
Variants§
Draft
Draft — not publicly visible.
Published
Published and publicly accessible.
Scheduled
Scheduled for future publication.
Implementations§
Source§impl PageStatus
impl PageStatus
Sourcepub fn is_published(&self) -> bool
pub fn is_published(&self) -> bool
Returns true if the page is published.
§Example
use ghost_io_api::models::page::PageStatus;
assert!(PageStatus::Published.is_published());
assert!(!PageStatus::Draft.is_published());Sourcepub fn is_draft(&self) -> bool
pub fn is_draft(&self) -> bool
Returns true if the page is a draft.
§Example
use ghost_io_api::models::page::PageStatus;
assert!(PageStatus::Draft.is_draft());Sourcepub fn is_scheduled(&self) -> bool
pub fn is_scheduled(&self) -> bool
Returns true if the page is scheduled.
§Example
use ghost_io_api::models::page::PageStatus;
assert!(PageStatus::Scheduled.is_scheduled());Trait Implementations§
Source§impl Clone for PageStatus
impl Clone for PageStatus
Source§fn clone(&self) -> PageStatus
fn clone(&self) -> PageStatus
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 moreimpl Copy for PageStatus
Source§impl Debug for PageStatus
impl Debug for PageStatus
Source§impl Default for PageStatus
impl Default for PageStatus
Source§fn default() -> PageStatus
fn default() -> PageStatus
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for PageStatus
impl<'de> Deserialize<'de> for PageStatus
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 PageStatus
Source§impl PartialEq for PageStatus
impl PartialEq for PageStatus
Source§fn eq(&self, other: &PageStatus) -> bool
fn eq(&self, other: &PageStatus) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl Serialize for PageStatus
impl Serialize for PageStatus
impl StructuralPartialEq for PageStatus
Auto Trait Implementations§
impl Freeze for PageStatus
impl RefUnwindSafe for PageStatus
impl Send for PageStatus
impl Sync for PageStatus
impl Unpin for PageStatus
impl UnsafeUnpin for PageStatus
impl UnwindSafe for PageStatus
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.