[][src]Struct parsoid::TransclusionTemplate

pub struct TransclusionTemplate { /* fields omitted */ }

Representation of the data-mw part of mw:Transclusion.

Implementations

impl TransclusionTemplate[src]

pub fn name(&self) -> String[src]

Get the name of the template as it appears in wikitext

pub fn normalized_name(&self) -> String[src]

Get the normalized name of the template, e.g. ./Template:Foo or the parser function, e.g. ifeq.

pub fn get_params(&self) -> BTreeMap<String, String>[src]

Get a map of all parameters, named and unnamed

pub fn get_param(&self, name: &str) -> Option<String>[src]

Get the value of a specific parameter if it exists

pub fn get_param_in_wikitext(&self, name: &str) -> Option<String>[src]

Get the parameter as it appears in the wikitext. For example given {{1x|param<!--comment-->name=value}} looking up paramname would return Some("param<!--comment->name").

pub fn is_template(&self) -> bool[src]

Whether it's a template (as opposed to a parser function)

pub fn is_parser_function(&self) -> bool[src]

Whether it's a parser function (as opposed to a template)

Trait Implementations

impl Clone for TransclusionTemplate[src]

impl Debug for TransclusionTemplate[src]

impl<'de> Deserialize<'de> for TransclusionTemplate[src]

impl Serialize for TransclusionTemplate[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> DeserializeOwned for T where
    T: for<'de> Deserialize<'de>, 
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.