pub struct PluginMetadata { /* private fields */ }Expand description
Represents a plugin’s metadata.
Implementations§
Source§impl PluginMetadata
impl PluginMetadata
Sourcepub fn new(name: &str) -> Result<Self, RegexError>
pub fn new(name: &str) -> Result<Self, RegexError>
Create a value with no metadata for a plugin with the given filename.
Sourcepub fn group(&self) -> Option<&str>
pub fn group(&self) -> Option<&str>
Get the plugin’s group.
The Option is None if no group is explicitly set.
Sourcepub fn load_after_files(&self) -> &[File]
pub fn load_after_files(&self) -> &[File]
Get the plugins that the plugin must load after.
Sourcepub fn requirements(&self) -> &[File]
pub fn requirements(&self) -> &[File]
Get the files that the plugin requires to be installed.
Sourcepub fn incompatibilities(&self) -> &[File]
pub fn incompatibilities(&self) -> &[File]
Get the files that the plugin is incompatible with.
Get the plugin’s Bash Tag suggestions.
Sourcepub fn dirty_info(&self) -> &[PluginCleaningData]
pub fn dirty_info(&self) -> &[PluginCleaningData]
Get the plugin’s dirty plugin information.
Sourcepub fn clean_info(&self) -> &[PluginCleaningData]
pub fn clean_info(&self) -> &[PluginCleaningData]
Get the plugin’s clean plugin information.
Sourcepub fn unset_group(&mut self)
pub fn unset_group(&mut self)
Unsets the plugin’s group, so that it is implicitly a member of the default group.
Sourcepub fn set_load_after_files(&mut self, files: Vec<File>)
pub fn set_load_after_files(&mut self, files: Vec<File>)
Get the plugins that the plugin must load after.
Sourcepub fn set_requirements(&mut self, files: Vec<File>)
pub fn set_requirements(&mut self, files: Vec<File>)
Get the files that the plugin requires to be installed.
Sourcepub fn set_incompatibilities(&mut self, files: Vec<File>)
pub fn set_incompatibilities(&mut self, files: Vec<File>)
Get the files that the plugin is incompatible with.
Sourcepub fn set_messages(&mut self, messages: Vec<Message>)
pub fn set_messages(&mut self, messages: Vec<Message>)
Get the plugin’s messages.
Get the plugin’s Bash Tag suggestions.
Sourcepub fn set_dirty_info(&mut self, dirty_info: Vec<PluginCleaningData>)
pub fn set_dirty_info(&mut self, dirty_info: Vec<PluginCleaningData>)
Get the plugin’s dirty plugin information.
Sourcepub fn set_clean_info(&mut self, clean_info: Vec<PluginCleaningData>)
pub fn set_clean_info(&mut self, clean_info: Vec<PluginCleaningData>)
Get the plugin’s clean plugin information.
Sourcepub fn set_locations(&mut self, locations: Vec<Location>)
pub fn set_locations(&mut self, locations: Vec<Location>)
Get the locations at which this plugin can be found.
Sourcepub fn merge_metadata(&mut self, plugin: &PluginMetadata)
pub fn merge_metadata(&mut self, plugin: &PluginMetadata)
Merge metadata from the given PluginMetadata object into this object.
If an equal metadata object already exists in this PluginMetadata
object, it is not duplicated. This object’s group is replaced by the
given object’s group if the latter is explicit.
Sourcepub fn has_name_only(&self) -> bool
pub fn has_name_only(&self) -> bool
Check if no plugin metadata is set.
Sourcepub fn is_regex_plugin(&self) -> bool
pub fn is_regex_plugin(&self) -> bool
Check if the plugin name is a regular expression.
Returns true if the plugin name contains any of the characters :\*?|
and false otherwise.
Sourcepub fn name_matches(&self, other_name: &str) -> bool
pub fn name_matches(&self, other_name: &str) -> bool
Check if the given plugin name matches this plugin metadata object’s name field.
If the name field is a regular expression, the given plugin name will be matched against it, otherwise the strings will be compared case-insensitively. The given plugin name must be literal, i.e. not a regular expression.
Trait Implementations§
Source§impl Clone for PluginMetadata
impl Clone for PluginMetadata
Source§impl Debug for PluginMetadata
impl Debug for PluginMetadata
Source§impl Default for PluginMetadata
impl Default for PluginMetadata
impl Eq for PluginMetadata
Source§impl Hash for PluginMetadata
impl Hash for PluginMetadata
Source§impl Ord for PluginMetadata
impl Ord for PluginMetadata
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
1.21.0 (const: unstable) · Source§fn min(self, other: Self) -> Selfwhere
Self: Sized,
fn min(self, other: Self) -> Selfwhere
Self: Sized,
Source§impl PartialEq for PluginMetadata
impl PartialEq for PluginMetadata
Source§impl PartialOrd for PluginMetadata
impl PartialOrd for PluginMetadata
impl StructuralPartialEq for PluginMetadata
Auto Trait Implementations§
impl Freeze for PluginMetadata
impl RefUnwindSafe for PluginMetadata
impl Send for PluginMetadata
impl Sync for PluginMetadata
impl Unpin for PluginMetadata
impl UnsafeUnpin for PluginMetadata
impl UnwindSafe for PluginMetadata
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
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> ⓘ
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> ⓘ
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