host_utils

Struct UserData

source
pub struct UserData<'a> { /* private fields */ }

Implementations§

source§

impl<'a> UserData<'a>

source

pub fn new() -> Self

source

pub fn init( allow: &'a str, block: &'a str, redirect: &'a str, soucres: &'a str, ) -> Self

source

pub fn allow_cap(&self) -> usize

source

pub fn allow_len(&self) -> usize

source

pub fn block_cap(&self) -> usize

source

pub fn block_len(&self) -> usize

source

pub fn redirect_cap(&self) -> usize

source

pub fn redirect_len(&self) -> usize

source

pub fn sources_cap(&self) -> usize

source

pub fn sources_len(&self) -> usize

source

pub fn get_allow(&self) -> &HashSet<H<'_>>

source

pub fn insert_allow(&mut self, value: &'a str)

source

pub fn insert_allow_h(&mut self, value: H<'a>)

source

pub fn remove_allow(&mut self, value: &'a str)

source

pub fn get_block(&self) -> &HashSet<H<'_>>

source

pub fn insert_block(&mut self, value: &'a str)

source

pub fn remove_block(&mut self, value: &'a str)

source

pub fn get_redirect(&self) -> &HashSet<R<'_>>

source

pub fn find_redirect(&self, value: &str) -> Option<&R<'_>>

source

pub fn insert_redirect(&mut self, to: &'a str, from: &'a str)

source

pub fn push_redirect(&mut self, value: R<'a>)

source

pub fn remove_redirect(&mut self, value: &str)

source

pub fn get_sources(&self) -> &HashSet<H<'_>>

source

pub fn insert_sources(&mut self, value: &'a str)

source

pub fn remove_sources(&mut self, value: &'a str)

source

pub fn save(&self, paths: &StoragePath) -> Result<()>

Trait Implementations§

source§

impl<'a> Default for UserData<'a>

source§

fn default() -> UserData<'a>

Returns the “default value” for a type. Read more

Auto Trait Implementations§

§

impl<'a> Freeze for UserData<'a>

§

impl<'a> RefUnwindSafe for UserData<'a>

§

impl<'a> Send for UserData<'a>

§

impl<'a> Sync for UserData<'a>

§

impl<'a> Unpin for UserData<'a>

§

impl<'a> UnwindSafe for UserData<'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, 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.