RunMod

Struct RunMod 

Source
pub struct RunMod { /* private fields */ }

Implementations§

Source§

impl RunMod

Source

pub fn new(val: RunVar) -> Self

Makes a new RunMod

This method will never panic or fail

§Examples
use runmod::{RunMod, RunVar};

let value = RunMod::new(RunVar::I32(10));
Source

pub fn get_i8(&mut self) -> Option<i8>

Reads the source file andf gets a new value. I recommend that you disable autosave on your text editor/IDE (especily if it is high frequency), as this can cause unexpected panics.

This will update every time you call it, witch means it will open the file, read it, parse the line, then close it.

Source

pub fn get_i16(&mut self) -> Option<i16>

Reads the source file andf gets a new value. I recommend that you disable autosave on your text editor/IDE (especily if it is high frequency), as this can cause unexpected panics.

This will update every time you call it, witch means it will open the file, read it, parse the line, then close it.

Source

pub fn get_i32(&mut self) -> Option<i32>

Reads the source file andf gets a new value. I recommend that you disable autosave on your text editor/IDE (especily if it is high frequency), as this can cause unexpected panics.

This will update every time you call it, witch means it will open the file, read it, parse the line, then close it.

Source

pub fn get_i64(&mut self) -> Option<i64>

Reads the source file andf gets a new value. I recommend that you disable autosave on your text editor/IDE (especily if it is high frequency), as this can cause unexpected panics.

This will update every time you call it, witch means it will open the file, read it, parse the line, then close it.

Source

pub fn get_i128(&mut self) -> Option<i128>

Reads the source file andf gets a new value. I recommend that you disable autosave on your text editor/IDE (especily if it is high frequency), as this can cause unexpected panics.

This will update every time you call it, witch means it will open the file, read it, parse the line, then close it.

Source

pub fn get_isize(&mut self) -> Option<isize>

Reads the source file andf gets a new value. I recommend that you disable autosave on your text editor/IDE (especily if it is high frequency), as this can cause unexpected panics.

This will update every time you call it, witch means it will open the file, read it, parse the line, then close it.

Source

pub fn get_u8(&mut self) -> Option<u8>

Reads the source file andf gets a new value. I recommend that you disable autosave on your text editor/IDE (especily if it is high frequency), as this can cause unexpected panics.

This will update every time you call it, witch means it will open the file, read it, parse the line, then close it.

Source

pub fn get_u16(&mut self) -> Option<u16>

Reads the source file andf gets a new value. I recommend that you disable autosave on your text editor/IDE (especily if it is high frequency), as this can cause unexpected panics.

This will update every time you call it, witch means it will open the file, read it, parse the line, then close it.

Source

pub fn get_u32(&mut self) -> Option<u32>

Reads the source file andf gets a new value. I recommend that you disable autosave on your text editor/IDE (especily if it is high frequency), as this can cause unexpected panics.

This will update every time you call it, witch means it will open the file, read it, parse the line, then close it.

Source

pub fn get_u64(&mut self) -> Option<u64>

Reads the source file andf gets a new value. I recommend that you disable autosave on your text editor/IDE (especily if it is high frequency), as this can cause unexpected panics.

This will update every time you call it, witch means it will open the file, read it, parse the line, then close it.

Source

pub fn get_u128(&mut self) -> Option<u128>

Reads the source file andf gets a new value. I recommend that you disable autosave on your text editor/IDE (especily if it is high frequency), as this can cause unexpected panics.

This will update every time you call it, witch means it will open the file, read it, parse the line, then close it.

Source

pub fn get_usize(&mut self) -> Option<usize>

Reads the source file andf gets a new value. I recommend that you disable autosave on your text editor/IDE (especily if it is high frequency), as this can cause unexpected panics.

This will update every time you call it, witch means it will open the file, read it, parse the line, then close it.

Source

pub fn get_f32(&mut self) -> Option<f32>

Reads the source file andf gets a new value. I recommend that you disable autosave on your text editor/IDE (especily if it is high frequency), as this can cause unexpected panics.

This will update every time you call it, witch means it will open the file, read it, parse the line, then close it.

Source

pub fn get_f64(&mut self) -> Option<f64>

Reads the source file andf gets a new value. I recommend that you disable autosave on your text editor/IDE (especily if it is high frequency), as this can cause unexpected panics.

This will update every time you call it, witch means it will open the file, read it, parse the line, then close it.

Source

pub fn get_string(&mut self) -> Option<String>

This method will only panic if the line does not have at least two quotes (it will take all text between them) It will parce escape sequences with the rust compiler, so it should be accurate (i.e. \n will become a new line, etc) This is (suprisingly not that much slower then the number ones, only 0.002ms slower) I have not tested this with utf-16, so it may not work

Trait Implementations§

Source§

impl Clone for RunMod

Source§

fn clone(&self) -> RunMod

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Display for RunMod

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl From<RunVar> for RunMod

Source§

fn from(value: RunVar) -> Self

Converts to this type from the input type.

Auto Trait Implementations§

§

impl Freeze for RunMod

§

impl RefUnwindSafe for RunMod

§

impl Send for RunMod

§

impl Sync for RunMod

§

impl Unpin for RunMod

§

impl UnwindSafe for RunMod

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> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. 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> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T> ToString for T
where T: Display + ?Sized,

Source§

fn to_string(&self) -> String

Converts the given value to a String. Read more
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.