pub struct PluginLanguages { /* private fields */ }Expand description
The set of runtime-registered languages.
Clone is cheap by construction — registrations sit behind Arc, so
a clone is a refcount bump per language plus one small map — which is
what makes the copy-on-write write path affordable. It is paid on
plugin load and unload, not on any read.
Implementations§
Source§impl PluginLanguages
impl PluginLanguages
pub fn resolve_extension(&self, ext: &str) -> Option<LanguageName>
pub fn get(&self, name: LanguageName) -> Option<&Arc<LanguageRegistration>>
pub fn iter(&self) -> impl Iterator<Item = &Arc<LanguageRegistration>>
pub fn is_empty(&self) -> bool
Trait Implementations§
Source§impl Clone for PluginLanguages
impl Clone for PluginLanguages
Source§fn clone(&self) -> PluginLanguages
fn clone(&self) -> PluginLanguages
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 PluginLanguages
impl Debug for PluginLanguages
Source§impl Default for PluginLanguages
impl Default for PluginLanguages
Source§fn default() -> PluginLanguages
fn default() -> PluginLanguages
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for PluginLanguages
impl RefUnwindSafe for PluginLanguages
impl Send for PluginLanguages
impl Sync for PluginLanguages
impl Unpin for PluginLanguages
impl UnsafeUnpin for PluginLanguages
impl UnwindSafe for PluginLanguages
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,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more