Struct parse_mediawiki_sql::field_types::PageRestrictionsOld [−][src]
pub struct PageRestrictionsOld<'a>(pub BTreeMap<PageAction<'a>, Vec<ProtectionLevel<'a>>>);Expand description
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 | spec (":" spec)*
spec: action "=" level
level: "autoconfirmed" | "templateeditor" | "sysop" | ""
action: "edit" | "move" | "upload"However, spec is treated as having the following format, because the
documentation for this field gives the example
edit=autoconfirmed,sysop:move=sysop with multiple protection levels per
action:
spec: action "=" level ("," level)*The example given is nonsensical because users in the sysop group have
all the rights of users in the autoconfirmed group, and neither English
Wikipedia nor English Wiktionary have any page_restrictions strings in this
format, but perhaps these types of protection strings have existed in the past
or exist now on other wikis.
Tuple Fields
0: BTreeMap<PageAction<'a>, Vec<ProtectionLevel<'a>>>Implementations
Trait Implementations
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
impl<'a> From<BTreeMap<PageAction<'a>, Vec<ProtectionLevel<'a>, Global>>> for PageRestrictionsOld<'a>
impl<'a> From<BTreeMap<PageAction<'a>, Vec<ProtectionLevel<'a>, Global>>> for PageRestrictionsOld<'a>
Performs the conversion.
Performs the conversion.
impl<'a> FromIterator<(PageAction<'a>, Vec<ProtectionLevel<'a>, Global>)> for PageRestrictionsOld<'a>
impl<'a> FromIterator<(PageAction<'a>, Vec<ProtectionLevel<'a>, Global>)> for PageRestrictionsOld<'a>
fn from_iter<I: IntoIterator<Item = (PageAction<'a>, Vec<ProtectionLevel<'a>>)>>(
iter: I
) -> Self
fn from_iter<I: IntoIterator<Item = (PageAction<'a>, Vec<ProtectionLevel<'a>>)>>(
iter: I
) -> Self
Creates a value from an iterator. Read more
type Output = Vec<ProtectionLevel<'a>>
type Output = Vec<ProtectionLevel<'a>>
The returned type after indexing.
Performs the indexing (container[index]) operation. Read more
This method tests for self and other values to be equal, and is used
by ==. Read more
This method tests for !=.
This method returns an ordering between self and other values if one exists. Read more
This method tests less than (for self and other) and is used by the < operator. Read more
This method tests less than or equal to (for self and other) and is used by the <=
operator. Read more
This method tests greater than (for self and other) and is used by the > operator. Read more
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
Mutably borrows from an owned value. Read more
