pub struct Visibility {
pub text: bool,
pub editor: bool,
pub comment: bool,
}Expand description
Visibility flags for articles (present on visibility-change events).
When the editing community flags a revision as containing potentially damaging information, they change its visibility. The three booleans indicate whether the article body, editor name, or edit comment may contain harmful data.
§Examples
use wme_models::Visibility;
let visibility = Visibility {
text: true,
editor: false,
comment: false,
};
// When text=false, the article content is hidden
// When editor=false, the editor name is hidden
// When comment=false, the edit summary is hiddenFields§
§text: boolIs article text visible?
editor: boolIs editor name visible?
comment: boolIs edit comment visible?
Trait Implementations§
Source§impl Clone for Visibility
impl Clone for Visibility
Source§fn clone(&self) -> Visibility
fn clone(&self) -> Visibility
Returns a duplicate 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 Visibility
impl Debug for Visibility
Source§impl<'de> Deserialize<'de> for Visibility
impl<'de> Deserialize<'de> for Visibility
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 PartialEq for Visibility
impl PartialEq for Visibility
Source§impl Serialize for Visibility
impl Serialize for Visibility
impl StructuralPartialEq for Visibility
Auto Trait Implementations§
impl Freeze for Visibility
impl RefUnwindSafe for Visibility
impl Send for Visibility
impl Sync for Visibility
impl Unpin for Visibility
impl UnsafeUnpin for Visibility
impl UnwindSafe for Visibility
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