pub struct SourceDefinition {
pub emoji: String,
pub install: String,
pub check: String,
pub prefix: Option<String>,
pub overrides: Option<HashMap<String, PlatformOverride>>,
}Fields§
§emoji: StringEmoji icon to represent this source
install: StringCommand template to install packages
check: StringCommand to list installed packages from this source
prefix: Option<String>String to prepend to package names (optional)
overrides: Option<HashMap<String, PlatformOverride>>Platform-specific command overrides
Implementations§
Source§impl SourceDefinition
impl SourceDefinition
Sourcepub fn get_install_command(&self, platform: &Platform) -> &str
pub fn get_install_command(&self, platform: &Platform) -> &str
Get the appropriate command for the current platform
Sourcepub fn get_check_command(&self, platform: &Platform) -> &str
pub fn get_check_command(&self, platform: &Platform) -> &str
Get the appropriate check command for the current platform
Trait Implementations§
Source§impl Clone for SourceDefinition
impl Clone for SourceDefinition
Source§fn clone(&self) -> SourceDefinition
fn clone(&self) -> SourceDefinition
Returns a duplicate of the value. Read more
1.0.0 · 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 SourceDefinition
impl Debug for SourceDefinition
Source§impl<'de> Deserialize<'de> for SourceDefinition
impl<'de> Deserialize<'de> for SourceDefinition
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
Auto Trait Implementations§
impl Freeze for SourceDefinition
impl RefUnwindSafe for SourceDefinition
impl Send for SourceDefinition
impl Sync for SourceDefinition
impl Unpin for SourceDefinition
impl UnwindSafe for SourceDefinition
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