pub enum CharDataTable<V: 'static> {
// some variants omitted
}
Expand description
A mapping from characters to some associated data.
For the set case, use ()
as the associated value.
Implementations§
Source§impl<V> CharDataTable<V>
impl<V> CharDataTable<V>
Source§impl<V: Copy> CharDataTable<V>
impl<V: Copy> CharDataTable<V>
Source§impl<V: Copy + Default> CharDataTable<V>
impl<V: Copy + Default> CharDataTable<V>
Sourcepub fn find_or_default(&self, needle: char) -> V
pub fn find_or_default(&self, needle: char) -> V
Find the associated data for a character in this table, or the default value if not entered.
Source§impl<V> CharDataTable<V>
impl<V> CharDataTable<V>
Sourcepub fn iter(&self) -> CharDataTableIter<'_, V> ⓘ
pub fn iter(&self) -> CharDataTableIter<'_, V> ⓘ
Iterate over the entries in this table. Yields pairs (CharRange, V)
.
Trait Implementations§
Source§impl<V: Clone + 'static> Clone for CharDataTable<V>
impl<V: Clone + 'static> Clone for CharDataTable<V>
Source§fn clone(&self) -> CharDataTable<V>
fn clone(&self) -> CharDataTable<V>
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<V: Debug + 'static> Debug for CharDataTable<V>
impl<V: Debug + 'static> Debug for CharDataTable<V>
Source§impl<V> Default for CharDataTable<V>
impl<V> Default for CharDataTable<V>
impl<V: Copy + 'static> Copy for CharDataTable<V>
Auto Trait Implementations§
impl<V> Freeze for CharDataTable<V>
impl<V> RefUnwindSafe for CharDataTable<V>where
V: RefUnwindSafe,
impl<V> Send for CharDataTable<V>where
V: Sync,
impl<V> Sync for CharDataTable<V>where
V: Sync,
impl<V> Unpin for CharDataTable<V>
impl<V> UnwindSafe for CharDataTable<V>where
V: RefUnwindSafe,
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
)