pub struct Source {
pub name: String,
pub url: String,
pub description: Option<String>,
pub enabled: bool,
pub local_path: Option<PathBuf>,
}Expand description
Git repository source containing Claude Code resources.
Defines repository location and metadata. Supports remote (HTTPS/SSH) and local repositories.
§Fields
name: Unique identifierurl: Repository location (HTTPS, SSH, file://, or local path)description: Optional descriptionenabled: Whether source is activelocal_path: Runtime cache location (not serialized)
Fields§
§name: StringUnique identifier for this source
url: StringRepository URL or local path
description: Option<String>Optional human-readable description
enabled: boolWhether this source is enabled for operations
local_path: Option<PathBuf>Runtime path to cached repository (not serialized)
Implementations§
Source§impl Source
impl Source
Sourcepub const fn new(name: String, url: String) -> Self
pub const fn new(name: String, url: String) -> Self
Creates a new source with the given name and URL.
§Arguments
name- Unique identifier for this sourceurl- Repository URL or local path
Sourcepub fn with_description(self, desc: String) -> Self
pub fn with_description(self, desc: String) -> Self
Adds a human-readable description to this source.
§Arguments
desc- Human-readable description of the source
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Source
impl<'de> Deserialize<'de> for Source
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 Source
impl RefUnwindSafe for Source
impl Send for Source
impl Sync for Source
impl Unpin for Source
impl UnwindSafe for Source
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