Struct mailpot::models::PostPolicy
source · pub struct PostPolicy {
pub pk: i64,
pub list: i64,
pub announce_only: bool,
pub subscription_only: bool,
pub approval_needed: bool,
pub open: bool,
pub custom: bool,
}
Expand description
A mailing list post policy entry.
Only one of the boolean flags must be set to true.
Fields§
§pk: i64
Database primary key.
list: i64
Mailing list foreign key (See MailingList
).
announce_only: bool
Whether the policy is announce only (Only list owners can submit posts, and everyone will receive them).
subscription_only: bool
Whether the policy is “subscription only” (Only list subscriptions can post).
approval_needed: bool
Whether the policy is “approval needed” (Anyone can post, but approval from list owners is required if they are not subscribed).
open: bool
Whether the policy is “open” (Anyone can post, but approval from list owners is required. Subscriptions are not enabled).
custom: bool
Custom policy.
Trait Implementations§
source§impl Clone for PostPolicy
impl Clone for PostPolicy
source§fn clone(&self) -> PostPolicy
fn clone(&self) -> PostPolicy
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 PostPolicy
impl Debug for PostPolicy
source§impl<'de> Deserialize<'de> for PostPolicy
impl<'de> Deserialize<'de> for PostPolicy
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 Display for PostPolicy
impl Display for PostPolicy
source§impl PartialEq<PostPolicy> for PostPolicy
impl PartialEq<PostPolicy> for PostPolicy
source§fn eq(&self, other: &PostPolicy) -> bool
fn eq(&self, other: &PostPolicy) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl Serialize for PostPolicy
impl Serialize for PostPolicy
impl Eq for PostPolicy
impl StructuralEq for PostPolicy
impl StructuralPartialEq for PostPolicy
Auto Trait Implementations§
impl RefUnwindSafe for PostPolicy
impl Send for PostPolicy
impl Sync for PostPolicy
impl Unpin for PostPolicy
impl UnwindSafe for PostPolicy
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<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.