Struct idgenerator::instance::IdVecInstance
source · [−]pub struct IdVecInstance;
Expand description
Instance of multiple generators contained in a vector
Implementations
sourceimpl IdVecInstance
impl IdVecInstance
sourcepub fn init(options: Vec<IdGeneratorOptions>) -> Result<(), OptionError>
pub fn init(options: Vec<IdGeneratorOptions>) -> Result<(), OptionError>
Initialize the instance
Every time you call this function will drop all the previous generators in the instance.
sourcepub fn set_options(
index: usize,
options: IdGeneratorOptions
) -> Result<(), OptionError>
pub fn set_options(
index: usize,
options: IdGeneratorOptions
) -> Result<(), OptionError>
Set instance options of the given index
sourcepub fn get_options(index: usize) -> Result<IdGeneratorOptions, OptionError>
pub fn get_options(index: usize) -> Result<IdGeneratorOptions, OptionError>
Get instance options of the given index
Auto Trait Implementations
impl RefUnwindSafe for IdVecInstance
impl Send for IdVecInstance
impl Sync for IdVecInstance
impl Unpin for IdVecInstance
impl UnwindSafe for IdVecInstance
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcepub fn borrow_mut(&mut self) -> &mut T
pub fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more