pub struct BracketConfigStore { /* private fields */ }Expand description
Store for bracket configs registered by language modules during init.
Follows the same pattern as LanguageInfoStore.
Implementations§
Source§impl BracketConfigStore
impl BracketConfigStore
Sourcepub fn add(&self, config: BracketConfig)
pub fn add(&self, config: BracketConfig)
Add a bracket config to the store.
Called by language modules during init().
Sourcepub fn find(&self, language_id: &str) -> Option<BracketConfig>
pub fn find(&self, language_id: &str) -> Option<BracketConfig>
Find a bracket config by language ID.
Sourcepub fn find_or_default(&self, language_id: &str) -> BracketConfig
pub fn find_or_default(&self, language_id: &str) -> BracketConfig
Find a bracket config by language ID, falling back to the default.
Sourcepub fn take_all(&self) -> Vec<BracketConfig>
pub fn take_all(&self) -> Vec<BracketConfig>
Take all registered configs.
This drains the store; subsequent calls return an empty vec.
Trait Implementations§
Source§impl Debug for BracketConfigStore
impl Debug for BracketConfigStore
Source§impl Default for BracketConfigStore
impl Default for BracketConfigStore
Source§fn default() -> BracketConfigStore
fn default() -> BracketConfigStore
Returns the “default value” for a type. Read more
impl Service for BracketConfigStore
Auto Trait Implementations§
impl !Freeze for BracketConfigStore
impl !RefUnwindSafe for BracketConfigStore
impl Send for BracketConfigStore
impl Sync for BracketConfigStore
impl Unpin for BracketConfigStore
impl UnsafeUnpin for BracketConfigStore
impl UnwindSafe for BracketConfigStore
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