[][src]Struct bbclash::ASTElement

pub struct ASTElement { /* fields omitted */ }

A single element of a BBCode AST.

Methods

impl ASTElement[src]

pub fn new(ele_type: GroupType) -> ASTElement[src]

Creates a new ASTElement.

pub fn set_ele_type(&mut self, new_type: GroupType)[src]

Sets an ASTElement's type.

pub fn ele_type(&self) -> &GroupType[src]

Gets an immutable reference to an ASTElement's type.

pub fn set_void(&mut self, in_void: bool)[src]

Sets an ASTElement's is_void field (indicates that the ASTElement does not contain text or children).

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

gets the value of an ASTElement's is_void field.

pub fn add_text(&mut self, new_text: &str)[src]

Adds text to an ASTElement.

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

Gets whether or not an ASTElement has text.

pub fn text_contents(&self) -> &Option<String>[src]

Gets an immutable reference to an ASTElement's text_contents.

pub fn set_arg(&mut self, arg: &str)[src]

Sets an ASTElement's Argument field.

pub fn add_arg(&mut self, new_arg: &str)[src]

Adds to arg of an ASTElement.

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

Gets whether or not an ASTElement has an argument.

pub fn argument(&self) -> &Option<String>[src]

Gets an immutable reference to an ASTElement's argument field.

pub fn set_detachable(&mut self, in_det: bool)[src]

Sets an ASTElement's detachable field (indicates whether the element should be detatched if empty);

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

Gets the value of an ASTElement's detachable field.

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

Gets the value of an ASTElement's broken field.

Trait Implementations

impl Clone for ASTElement[src]

impl Debug for ASTElement[src]

Auto Trait Implementations

Blanket Implementations

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

impl<T> From<T> for 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.

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

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

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