pub struct Plugins<'a>(/* private fields */);
Expand description
Represents a collection of plugins.
Trait Implementations§
Source§impl<'de, 'a> Deserialize<'de> for Plugins<'a>where
'de: 'a,
impl<'de, 'a> Deserialize<'de> for Plugins<'a>where
'de: 'a,
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Display for Plugins<'_>
impl Display for Plugins<'_>
Source§fn fmt(&self, f: &mut Formatter<'_>) -> Result
fn fmt(&self, f: &mut Formatter<'_>) -> Result
Formats the Plugins
as a string.
§Example
use kmmp_structure::gradle::{Plugins, PluginIndentifier};
let plugin1 = PluginIndentifier::new("plugin1", true);
let plugin2 = PluginIndentifier::new("plugin2", false);
let plugins = Plugins::new(&vec![plugin1, plugin2]);
let expected_output = "plugins {
kotlin(\"plugin1\")
id(\"plugin2\")
}";
assert_eq!(plugins.to_string(), expected_output);
Source§impl<'a> From<Vec<PluginIndentifier<'a>>> for Plugins<'a>
impl<'a> From<Vec<PluginIndentifier<'a>>> for Plugins<'a>
Source§fn from(vector: Vec<PluginIndentifier<'a>>) -> Self
fn from(vector: Vec<PluginIndentifier<'a>>) -> Self
Creates a new Plugins
instance with the specified plugins from vector.
§Arguments
plugins
- A reference to a vector ofPluginIndentifier
instances.
§Example
use kmmp_project_manager::{Plugins, PluginIndentifier};
let plugin1 = PluginIndentifier::new("plugin1", true);
let plugin2 = PluginIndentifier::new("plugin2", false);
let plugins = Plugins::new(vec![plugin1, plugin2]);
Source§impl<'a> PartialOrd for Plugins<'a>
impl<'a> PartialOrd for Plugins<'a>
impl<'a> StructuralPartialEq for Plugins<'a>
Auto Trait Implementations§
impl<'a> Freeze for Plugins<'a>
impl<'a> RefUnwindSafe for Plugins<'a>
impl<'a> Send for Plugins<'a>
impl<'a> Sync for Plugins<'a>
impl<'a> Unpin for Plugins<'a>
impl<'a> UnwindSafe for Plugins<'a>
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