pub enum Source {
Git {
url: String,
git_ref: Option<String>,
path: Option<String>,
},
Local(PathBuf),
}Expand description
Where a skill comes from.
Variants§
Git
A git repository; path is the skill folder inside it.
Local(PathBuf)
A folder, or a .zip/.skill archive (absolute).
Implementations§
Source§impl Source
impl Source
Sourcepub fn parse(text: &str, fs: &dyn Fs) -> Self
pub fn parse(text: &str, fs: &dyn Fs) -> Self
Reads a source argument: a URL (https://, http://, ssh://,
git://, file://, user@host:path) is git, and a GitHub
/tree/<ref>/<path> or /blob/<ref>/<path>/SKILL.md URL carries
the ref and the path; a bare git repository folder is git too;
anything else is a local folder or archive (made absolute by the
caller).
Trait Implementations§
impl Eq for Source
impl StructuralPartialEq for Source
Auto Trait Implementations§
impl Forget for Source
impl Freeze for Source
impl Move for Source
impl RefUnwindSafe for Source
impl Send for Sourcewhere
RawVecInner: Send,
impl Sync for Sourcewhere
RawVecInner: Sync,
impl Unpin for Source
impl UnsafeUnpin for Source
impl UnwindSafe for Sourcewhere
RawVecInner: UnwindSafe,
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,
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
Compare self to
key and return true if they are equal.