[−][src]Struct parse_mediawiki_sql::types::PageRestrictionsOld
Represents page_restrictions
,
an outdated field of the page
table containing a string representing
a map from action to the groups that are allowed to perform that action.
Here the action is represented by PageAction
and the protection level by ProtectionLevel
.
This field was replaced by the
page_restrictions
table
in MediaWiki 1.10, but is still used by the software if a page's restrictions have not
been changed since MediaWiki 1.10 came out.
The string is in the following format, at least on the English Wiktionary:
# level on its own seems to be shorthand for both "edit" and "move"
"" | level | spec (":" spec)*
spec: action "=" level
# "" means no restrictions
level: "autoconfirmed" | "templateeditor" | "sysop" | ""
action: "edit" | "move" | "upload"
However, spec
is treated as having the following format, because the
MediaWiki documentation for the page
table
gives
the example edit=autoconfirmed,sysop:move=sysop
with multiple protection
levels per action:
spec
: action "=" level ("," level)*
The example given is nonsensical because autoconfirmed
is a subset of
sysop
, and neither English Wikipedia nor English Wiktionary have any
page_restrictions
strings in this format, but perhaps another wiki does.
Implementations
impl<'a> PageRestrictionsOld<'a>
[src]
pub fn len(&self) -> usize
[src]
pub fn is_empty(&self) -> bool
[src]
pub fn iter(
&self
) -> impl Iterator<Item = (&PageAction<'a>, &Vec<ProtectionLevel<'a>>)>
[src]
&self
) -> impl Iterator<Item = (&PageAction<'a>, &Vec<ProtectionLevel<'a>>)>
Trait Implementations
impl<'a> Clone for PageRestrictionsOld<'a>
[src]
fn clone(&self) -> PageRestrictionsOld<'a>
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl<'a> Debug for PageRestrictionsOld<'a>
[src]
impl<'a> Eq for PageRestrictionsOld<'a>
[src]
impl<'a> FromIterator<(PageAction<'a>, Vec<ProtectionLevel<'a>>)> for PageRestrictionsOld<'a>
[src]
fn from_iter<I: IntoIterator<Item = (PageAction<'a>, Vec<ProtectionLevel<'a>>)>>(
iter: I
) -> Self
[src]
iter: I
) -> Self
impl<'a> FromSql<'a> for PageRestrictionsOld<'a>
[src]
impl<'a> Hash for PageRestrictionsOld<'a>
[src]
fn hash<__H: Hasher>(&self, state: &mut __H)
[src]
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
1.3.0[src]
H: Hasher,
impl<'a> Index<PageAction<'a>> for PageRestrictionsOld<'a>
[src]
type Output = Vec<ProtectionLevel<'a>>
The returned type after indexing.
fn index(&self, idx: PageAction<'a>) -> &Self::Output
[src]
impl<'a> Ord for PageRestrictionsOld<'a>
[src]
fn cmp(&self, other: &PageRestrictionsOld<'a>) -> Ordering
[src]
#[must_use]fn max(self, other: Self) -> Self
1.21.0[src]
#[must_use]fn min(self, other: Self) -> Self
1.21.0[src]
#[must_use]fn clamp(self, min: Self, max: Self) -> Self
[src]
impl<'a> PartialEq<PageRestrictionsOld<'a>> for PageRestrictionsOld<'a>
[src]
fn eq(&self, other: &PageRestrictionsOld<'a>) -> bool
[src]
fn ne(&self, other: &PageRestrictionsOld<'a>) -> bool
[src]
impl<'a> PartialOrd<PageRestrictionsOld<'a>> for PageRestrictionsOld<'a>
[src]
fn partial_cmp(&self, other: &PageRestrictionsOld<'a>) -> Option<Ordering>
[src]
fn lt(&self, other: &PageRestrictionsOld<'a>) -> bool
[src]
fn le(&self, other: &PageRestrictionsOld<'a>) -> bool
[src]
fn gt(&self, other: &PageRestrictionsOld<'a>) -> bool
[src]
fn ge(&self, other: &PageRestrictionsOld<'a>) -> bool
[src]
impl<'a> StructuralEq for PageRestrictionsOld<'a>
[src]
impl<'a> StructuralPartialEq for PageRestrictionsOld<'a>
[src]
Auto Trait Implementations
impl<'a> RefUnwindSafe for PageRestrictionsOld<'a>
impl<'a> Send for PageRestrictionsOld<'a>
impl<'a> Sync for PageRestrictionsOld<'a>
impl<'a> Unpin for PageRestrictionsOld<'a>
impl<'a> UnwindSafe for PageRestrictionsOld<'a>
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,