pub struct OptionsCollection {
pub options: Vec<OptionInfo>,
}Expand description
An owned snapshot of every option in a cpdb_options_t.
Fields§
§options: Vec<OptionInfo>Every option discovered.
Implementations§
Source§impl OptionsCollection
impl OptionsCollection
Sourcepub unsafe fn from_raw(raw: *mut cpdb_options_t) -> Result<Self>
pub unsafe fn from_raw(raw: *mut cpdb_options_t) -> Result<Self>
Builds an OptionsCollection by iterating raw.table.
§Safety
raw must be either null or a valid pointer to a fully initialised
cpdb_options_t whose table field is a valid GHashTable*.
Sourcepub fn get(&self, name: &str) -> Option<&OptionInfo>
pub fn get(&self, name: &str) -> Option<&OptionInfo>
Finds an option by name (linear search).
Sourcepub fn iter(&self) -> impl Iterator<Item = &OptionInfo>
pub fn iter(&self) -> impl Iterator<Item = &OptionInfo>
Returns an iterator over all options.
Trait Implementations§
Source§impl Clone for OptionsCollection
impl Clone for OptionsCollection
Source§fn clone(&self) -> OptionsCollection
fn clone(&self) -> OptionsCollection
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 OptionsCollection
impl Debug for OptionsCollection
Source§impl Default for OptionsCollection
impl Default for OptionsCollection
Source§fn default() -> OptionsCollection
fn default() -> OptionsCollection
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for OptionsCollection
impl RefUnwindSafe for OptionsCollection
impl Send for OptionsCollection
impl Sync for OptionsCollection
impl Unpin for OptionsCollection
impl UnsafeUnpin for OptionsCollection
impl UnwindSafe for OptionsCollection
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