pub struct KTuple { /* private fields */ }
Expand description
Terminal symbol string type
Implementations§
source§impl KTuple
impl KTuple
sourcepub fn with_terminal_indices(self, terms: &[TerminalIndex]) -> Self
pub fn with_terminal_indices(self, terms: &[TerminalIndex]) -> Self
Used for debugging only
sourcepub fn from_slice(
others: &[CompiledTerminal],
k: usize,
max_terminal_index: usize,
) -> Self
pub fn from_slice( others: &[CompiledTerminal], k: usize, max_terminal_index: usize, ) -> Self
Creates a new object from a slice of CompiledTerminals
sourcepub fn of(t: Terminals, k: usize) -> Self
pub fn of(t: Terminals, k: usize) -> Self
Creates a new object from a vector of terminal symbols
sourcepub fn push(&mut self, t: CompiledTerminal) -> Result<(), String>
pub fn push(&mut self, t: CompiledTerminal) -> Result<(), String>
Adds a new terminal to self while consuming self
sourcepub fn is_k_complete(&self) -> bool
pub fn is_k_complete(&self) -> bool
Checks if the sequence is k-complete
sourcepub fn k_concat(self, other: &Self, k: usize) -> Self
pub fn k_concat(self, other: &Self, k: usize) -> Self
Concat self with another sequence while consuming self
Trait Implementations§
source§impl Extend<CompiledTerminal> for KTuple
impl Extend<CompiledTerminal> for KTuple
source§fn extend<I: IntoIterator<Item = CompiledTerminal>>(&mut self, iter: I)
fn extend<I: IntoIterator<Item = CompiledTerminal>>(&mut self, iter: I)
Extends a collection with the contents of an iterator. Read more
source§fn extend_one(&mut self, item: A)
fn extend_one(&mut self, item: A)
🔬This is a nightly-only experimental API. (
extend_one
)Extends a collection with exactly one element.
source§fn extend_reserve(&mut self, additional: usize)
fn extend_reserve(&mut self, additional: usize)
🔬This is a nightly-only experimental API. (
extend_one
)Reserves capacity in a collection for the given number of additional elements. Read more
source§impl Extend<u16> for KTuple
impl Extend<u16> for KTuple
source§fn extend<I: IntoIterator<Item = TerminalIndex>>(&mut self, iter: I)
fn extend<I: IntoIterator<Item = TerminalIndex>>(&mut self, iter: I)
Extends a collection with the contents of an iterator. Read more
source§fn extend_one(&mut self, item: A)
fn extend_one(&mut self, item: A)
🔬This is a nightly-only experimental API. (
extend_one
)Extends a collection with exactly one element.
source§fn extend_reserve(&mut self, additional: usize)
fn extend_reserve(&mut self, additional: usize)
🔬This is a nightly-only experimental API. (
extend_one
)Reserves capacity in a collection for the given number of additional elements. Read more
source§impl Ord for KTuple
impl Ord for KTuple
source§impl PartialOrd for KTuple
impl PartialOrd for KTuple
impl Copy for KTuple
impl Eq for KTuple
impl StructuralPartialEq for KTuple
Auto Trait Implementations§
impl Freeze for KTuple
impl RefUnwindSafe for KTuple
impl Send for KTuple
impl Sync for KTuple
impl Unpin for KTuple
impl UnwindSafe for KTuple
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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)source§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.