Struct namegen::WorkingSet [−][src]
A WorkingSet is a crucial part of this generator's performance. It is all local state required to generate a name and get the output without performing additional allocations per generation once the WorkingSet's underlying vectors have grown.
This also means that if you have a working set per thread, then generating names is completely thread safe.
WARNING: While the fields are public, they're not guaranteed in any way. You should always
use WorkingSet::new()
to create new working sets.
Fields
result: Vec<usize>
result_str: String
result_chars: Vec<char>
result_total: String
stack: Vec<usize>
stack_pos: Vec<usize>
stack_weight: Vec<usize>
subtokens: Vec<usize>
Implementations
impl WorkingSet
[src]
pub fn get_result(&self) -> &str
[src]
Get the results from the last generator call. If you need to keep it around, copy it to another string.
pub fn new() -> WorkingSet
[src]
Auto Trait Implementations
impl RefUnwindSafe for WorkingSet
impl Send for WorkingSet
impl Sync for WorkingSet
impl Unpin for WorkingSet
impl UnwindSafe for WorkingSet
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,