[−][src]Struct bbclash::ASTElement
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]
fn clone(&self) -> ASTElement
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl Debug for ASTElement
[src]
Auto Trait Implementations
impl Send for ASTElement
impl Sync for ASTElement
impl Unpin for ASTElement
impl UnwindSafe for ASTElement
impl RefUnwindSafe for ASTElement
Blanket Implementations
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> From<T> for T
[src]
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>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
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> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,