neutralts::bif

Struct Bif

Source
pub(crate) struct Bif<'a> {
Show 18 fields pub(crate) raw: &'a str, pub(crate) shared: &'a mut Shared, pub(crate) inherit: &'a mut BlockInherit, pub(crate) src: String, pub(crate) name: String, pub(crate) alias: String, pub(crate) code: String, pub(crate) params: String, pub(crate) flags: String, pub(crate) mod_filter: bool, pub(crate) mod_negate: bool, pub(crate) mod_upline: bool, pub(crate) mod_scope: bool, pub(crate) file_path: String, pub(crate) dir: String, pub(crate) out: String, pub(crate) only: &'a str, _none: &'a str,
}

Fields§

§raw: &'a str§shared: &'a mut Shared§inherit: &'a mut BlockInherit§src: String§name: String§alias: String§code: String§params: String§flags: String§mod_filter: bool§mod_negate: bool§mod_upline: bool§mod_scope: bool§file_path: String§dir: String§out: String§only: &'a str§_none: &'a str

Implementations§

Source§

impl<'a> Bif<'a>

Source

pub(crate) fn parse_bif_allow(&mut self) -> Result<(), BifError>

Source§

impl<'a> Bif<'a>

Source

pub(crate) fn parse_bif_array(&mut self) -> Result<(), BifError>

Source§

impl<'a> Bif<'a>

Source

pub(crate) fn parse_bif_bool(&mut self) -> Result<(), BifError>

Source§

impl<'a> Bif<'a>

Source

pub(crate) fn parse_bif_cache(&mut self) -> Result<(), BifError>

Source

pub(crate) fn cache_file_expires(&self, file_path: &Path, expires: u64) -> bool

Source

pub(crate) fn set_cache_dir(&self, cache_dir: &str) -> Result<(), BifError>

Source

pub(crate) fn get_cache_dir(&self, file: &str) -> String

Source§

impl<'a> Bif<'a>

Source

pub(crate) fn parse_bif_coalesce(&mut self) -> Result<(), BifError>

Source§

impl<'a> Bif<'a>

Source

pub(crate) fn parse_bif_code(&mut self) -> Result<(), BifError>

Source§

impl<'a> Bif<'a>

Source

pub(crate) fn parse_bif_contains(&mut self) -> Result<(), BifError>

Source§

impl<'a> Bif<'a>

Source

pub(crate) fn parse_bif_count(&mut self) -> Result<(), BifError>

Source§

impl<'a> Bif<'a>

Source

pub(crate) fn parse_bif_data(&mut self) -> Result<(), BifError>

Source§

impl<'a> Bif<'a>

Source

pub(crate) fn parse_bif_date(&mut self) -> Result<(), BifError>

Source§

impl<'a> Bif<'a>

Source

pub(crate) fn parse_bif_declare(&mut self) -> Result<(), BifError>

Source§

impl<'a> Bif<'a>

Source

pub(crate) fn parse_bif_defined(&mut self) -> Result<(), BifError>

Source§

impl<'a> Bif<'a>

Source

pub(crate) fn parse_bif_each(&mut self) -> Result<(), BifError>

Source

fn parse_bif_each_iter( &mut self, key_name: &str, val_name: &str, key: &String, val: &Value, )

Source§

impl<'a> Bif<'a>

Source

pub(crate) fn parse_bif_else(&mut self) -> Result<(), BifError>

Source§

impl<'a> Bif<'a>

Source

pub(crate) fn parse_bif_eval(&mut self) -> Result<(), BifError>

Source§

impl<'a> Bif<'a>

Source

pub(crate) fn parse_bif_exit(&mut self) -> Result<(), BifError>

Source§

impl<'a> Bif<'a>

Source

pub(crate) fn parse_bif_fetch(&mut self) -> Result<(), BifError>

Source§

impl<'a> Bif<'a>

Source

pub(crate) fn parse_bif_filled(&mut self) -> Result<(), BifError>

Source§

impl<'a> Bif<'a>

Source

pub(crate) fn parse_bif_flg(&mut self) -> Result<(), BifError>

Source§

impl<'a> Bif<'a>

Source

pub(crate) fn parse_bif_for(&mut self) -> Result<(), BifError>

Source§

impl<'a> Bif<'a>

Source

pub(crate) fn parse_bif_hash(&mut self) -> Result<(), BifError>

Source§

impl<'a> Bif<'a>

Source

pub(crate) fn parse_bif_include(&mut self) -> Result<(), BifError>

Source§

impl<'a> Bif<'a>

Source

pub(crate) fn parse_bif_join(&mut self) -> Result<(), BifError>

Source§

impl<'a> Bif<'a>

Source

pub(crate) fn parse_bif_lang(&mut self) -> Result<(), BifError>

Source§

impl<'a> Bif<'a>

Source

pub(crate) fn parse_bif_locale(&mut self) -> Result<(), BifError>

Source§

impl<'a> Bif<'a>

Source

pub(crate) fn parse_bif_moveto(&mut self) -> Result<(), BifError>

Source

pub(crate) fn moveto(&mut self, to: &str, code: &str)

Source§

impl<'a> Bif<'a>

Source

pub(crate) fn parse_bif_neutral(&mut self) -> Result<(), BifError>

Source§

impl<'a> Bif<'a>

Source

pub(crate) fn parse_bif_param(&mut self) -> Result<(), BifError>

Source§

impl<'a> Bif<'a>

Source

pub(crate) fn parse_bif_rand(&mut self) -> Result<(), BifError>

Source§

impl<'a> Bif<'a>

Source

pub(crate) fn parse_bif_redirect(&mut self) -> Result<(), BifError>

Source§

impl<'a> Bif<'a>

Source

pub(crate) fn parse_bif_replace(&mut self) -> Result<(), BifError>

Source§

impl<'a> Bif<'a>

Source

pub(crate) fn parse_bif_same(&mut self) -> Result<(), BifError>

Source§

impl<'a> Bif<'a>

Source

pub(crate) fn parse_bif_snippet(&mut self) -> Result<(), BifError>

Source§

impl<'a> Bif<'a>

Source

pub(crate) fn parse_bif_sum(&mut self) -> Result<(), BifError>

Source§

impl<'a> Bif<'a>

Source

pub(crate) fn parse_bif_trans(&mut self) -> Result<(), BifError>

Source§

impl<'a> Bif<'a>

Source

pub(crate) fn parse_bif_unknown(&mut self) -> Result<(), BifError>

Source§

impl<'a> Bif<'a>

Source

pub(crate) fn parse_bif_var(&mut self) -> Result<(), BifError>

Source§

impl<'a> Bif<'a>

Source

pub(crate) fn parse_bif_obj(&mut self) -> Result<(), BifError>

Source

fn parse_obj_values(&mut self, value: &mut Value, is_recursive_call: bool)

Source§

impl<'a> Bif<'a>

Source

pub(crate) fn new( raw_source: &'a str, shared: &'a mut Shared, inherit: &'a mut BlockInherit, only: &'a str, ) -> Self

Source

pub(crate) fn parse(&mut self) -> String

Source

pub(crate) fn set_modifiers(&mut self) -> String

Source

pub(crate) fn get_data(&self, name: &str) -> String

Source

pub(crate) fn set_data(&mut self, name: &str, value: &str)

Source

pub(crate) fn get_trans(&self, text: &str) -> String

Source

pub(crate) fn contains_allow(&self, source: &str) -> bool

Source

pub(crate) fn extract_params_code(&mut self, parse: bool) -> bool

Source

pub(crate) fn extract_args(&mut self) -> Vec<String>

Source

pub(crate) fn bif_error(&self, msg: &str) -> BifError

Auto Trait Implementations§

§

impl<'a> Freeze for Bif<'a>

§

impl<'a> RefUnwindSafe for Bif<'a>

§

impl<'a> Send for Bif<'a>

§

impl<'a> Sync for Bif<'a>

§

impl<'a> Unpin for Bif<'a>

§

impl<'a> !UnwindSafe for Bif<'a>

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

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

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

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

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> Ungil for T
where T: Send,