pub struct Abbreviations {
    vec: Vec<Abbreviation>,
    map: BTreeMap<u64, Abbreviation>,
}Expand description
A set of type abbreviations.
Construct an Abbreviations instance with the
abbreviations()
method.
Fields§
§vec: Vec<Abbreviation>§map: BTreeMap<u64, Abbreviation>Implementations§
Source§impl Abbreviations
 
impl Abbreviations
Sourcefn empty() -> Abbreviations
 
fn empty() -> Abbreviations
Construct a new, empty set of abbreviations.
Sourcefn insert(&mut self, abbrev: Abbreviation) -> Result<(), ()>
 
fn insert(&mut self, abbrev: Abbreviation) -> Result<(), ()>
Insert an abbreviation into the set.
Returns Ok if it is the first abbreviation in the set with its code,
Err if the code is a duplicate and there already exists an
abbreviation in the set with the given abbreviation’s code.
Sourcepub fn get(&self, code: u64) -> Option<&Abbreviation>
 
pub fn get(&self, code: u64) -> Option<&Abbreviation>
Get the abbreviation associated with the given code.
Trait Implementations§
Source§impl Clone for Abbreviations
 
impl Clone for Abbreviations
Source§fn clone(&self) -> Abbreviations
 
fn clone(&self) -> Abbreviations
Returns a duplicate 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 Abbreviations
 
impl Debug for Abbreviations
Source§impl Default for Abbreviations
 
impl Default for Abbreviations
Source§fn default() -> Abbreviations
 
fn default() -> Abbreviations
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for Abbreviations
impl RefUnwindSafe for Abbreviations
impl Send for Abbreviations
impl Sync for Abbreviations
impl Unpin for Abbreviations
impl UnwindSafe for Abbreviations
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