Struct gimli::read::abbrev::Abbreviations
source · 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 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 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 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