Struct rusty_systems::strings::ProductionString
source · pub struct ProductionString { /* private fields */ }Expand description
Represents strings in our L-system. Strings
are made up of a list of Token objects.
Implementations§
source§impl ProductionString
impl ProductionString
sourcepub fn empty() -> Self
pub fn empty() -> Self
Creates an / the empty production string. This is a
synonym for ProductionString::new.
sourcepub fn is_empty(&self) -> bool
pub fn is_empty(&self) -> bool
Whether the production string is empty or not. i.e., whether this is the empty string.
sourcepub fn push_token(&mut self, token: Token)
pub fn push_token(&mut self, token: Token)
Add another token to the end of the string.
Trait Implementations§
source§impl Clone for ProductionString
impl Clone for ProductionString
source§fn clone(&self) -> ProductionString
fn clone(&self) -> ProductionString
Returns a copy of the value. Read more
1.0.0 · 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 ProductionString
impl Debug for ProductionString
source§impl Default for ProductionString
impl Default for ProductionString
source§impl DisplaySystem for ProductionString
impl DisplaySystem for ProductionString
source§impl From<Token> for ProductionString
impl From<Token> for ProductionString
source§impl<'a> IntoIterator for &'a ProductionString
impl<'a> IntoIterator for &'a ProductionString
source§impl IntoIterator for ProductionString
impl IntoIterator for ProductionString
Auto Trait Implementations§
impl Freeze for ProductionString
impl RefUnwindSafe for ProductionString
impl Send for ProductionString
impl Sync for ProductionString
impl Unpin for ProductionString
impl UnwindSafe for ProductionString
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