You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
30 lines
402 B
30 lines
402 B
//! Structures for handling global and local post state.
|
|
use super::*;
|
|
|
|
mod global;
|
|
pub use global::*;
|
|
|
|
mod local;
|
|
pub use local::*;
|
|
|
|
#[derive(Debug)]
|
|
/// An open or closed post
|
|
pub enum Post
|
|
{
|
|
Open(Imouto),
|
|
Closed(post::Static),
|
|
}
|
|
|
|
impl Post
|
|
{
|
|
/// Is this post open
|
|
#[inline] pub fn is_open(&self) -> bool
|
|
{
|
|
if let Self::Open(_) = self {
|
|
true
|
|
} else {
|
|
false
|
|
}
|
|
}
|
|
}
|