pub struct ProductionBody { /* private fields */ }Implementations§
Source§impl ProductionBody
impl ProductionBody
Sourcepub fn new(string: ProductionString) -> Self
pub fn new(string: ProductionString) -> Self
Creates a new production body from the given
ProductionString.
Sourcepub fn try_with_chance(chance: f32, string: ProductionString) -> Result<Self>
pub fn try_with_chance(chance: f32, string: ProductionString) -> Result<Self>
Creates a new production body from the given
ProductionString that can occur with the given chance.
pub fn is_empty(&self) -> bool
pub fn len(&self) -> usize
pub fn string(&self) -> &ProductionString
pub fn chance(&self) -> &Chance
Trait Implementations§
Source§impl Clone for ProductionBody
impl Clone for ProductionBody
Source§fn clone(&self) -> ProductionBody
fn clone(&self) -> ProductionBody
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ProductionBody
impl Debug for ProductionBody
Source§impl SymbolIterable for ProductionBody
impl SymbolIterable for ProductionBody
Source§fn all_symbols_iter(&self) -> impl Iterator<Item = Symbol>
fn all_symbols_iter(&self) -> impl Iterator<Item = Symbol>
Iterate over all symbols contained in the object.
Source§fn all_symbols<C: FromIterator<Symbol>>(&self) -> C
fn all_symbols<C: FromIterator<Symbol>>(&self) -> C
Creates a collection of all the symbols that
[
self.all_symbols_iter] iterates over. Read moreAuto Trait Implementations§
impl Freeze for ProductionBody
impl RefUnwindSafe for ProductionBody
impl Send for ProductionBody
impl Sync for ProductionBody
impl Unpin for ProductionBody
impl UnsafeUnpin for ProductionBody
impl UnwindSafe for ProductionBody
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more