pub struct TypeViewRestriction {
pub kind: RestrictionKind,
pub codenames: Vec<String>,
}Expand description
A page-type-level view restriction declared by a
crate::page_type::PageTypeHandler::view_restriction hook. Only
Login and Permission kinds make sense at the type level
(password + groups need per-page configuration). Applied only
when a page carries no page/subtree restriction of its own.
Fields§
§kind: RestrictionKind§codenames: Vec<String>Implementations§
Source§impl TypeViewRestriction
impl TypeViewRestriction
Sourcepub fn permission<I, S>(codenames: I) -> Self
pub fn permission<I, S>(codenames: I) -> Self
Require at least one of codenames via the permission engine.
Trait Implementations§
Source§impl Clone for TypeViewRestriction
impl Clone for TypeViewRestriction
Auto Trait Implementations§
impl Freeze for TypeViewRestriction
impl RefUnwindSafe for TypeViewRestriction
impl Send for TypeViewRestriction
impl Sync for TypeViewRestriction
impl Unpin for TypeViewRestriction
impl UnsafeUnpin for TypeViewRestriction
impl UnwindSafe for TypeViewRestriction
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,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreCreates a shared type from an unshared type.