Struct bbscope::BBCode

source ·
pub struct BBCode {
    pub matchers: Arc<Vec<MatchInfo>>,
}
Expand description

The main bbcode system. You create this to parse bbcode! Inexpensive clones, since fields are all reference counted.

Fields§

§matchers: Arc<Vec<MatchInfo>>

Supply this!

Implementations§

Get a default bbcode parser. Should hopefully have reasonable defaults!

The basic direct replacement escapes for HTML. You don’t need these if you’re using ‘basics()’

Get a vector of the basic taginfos of bbcode. You don’t need this if you’re using ‘basics()’

If you have extra tags you want to add, use this function to turn the basic definitions into a vector of real MatchInfo for use in the bbcode system

Get a vector of ALL basic matchers! This is the function you want to call to get a vector for the bbcode generator!

Some fancy extra bbcode. Does not include basics! These are nonstandard, you don’t have to use them!

Main function! You call this to parse your raw bbcode! It also escapes html stuff so it can be used raw! Current version keeps newlines as-is and it’s expected you use pre-wrap, later there may be modes for more standard implementations

This MAY OR MAY NOT profile, depending on your featureset!

Trait Implementations§

Returns a copy of the value. Read more
Performs copy-assignment from source. Read more

Auto Trait Implementations§

Blanket Implementations§

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The resulting type after obtaining ownership.
Creates owned data from borrowed data, usually by cloning. Read more
Uses borrowed data to replace owned data, usually by cloning. Read more
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.