pub enum SourceFields {
Github {
owner_repo: String,
path_in_repo: String,
ref_: String,
},
Local {
path: String,
},
Url {
url: String,
},
}Expand description
Source-specific fields, making illegal states unrepresentable.
Instead of optional fields on Entry (Python’s approach), we use an enum so each variant carries exactly the fields it needs.
Variants§
Implementations§
Source§impl SourceFields
impl SourceFields
Sourcepub fn source_type(&self) -> &str
pub fn source_type(&self) -> &str
The source type identifier used in the Skillfile format and lock keys.
Sourcepub fn as_github(&self) -> Option<(&str, &str, &str)>
pub fn as_github(&self) -> Option<(&str, &str, &str)>
Access GitHub-specific fields. Returns None for non-GitHub sources.
Trait Implementations§
Source§impl Clone for SourceFields
impl Clone for SourceFields
Source§fn clone(&self) -> SourceFields
fn clone(&self) -> SourceFields
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 SourceFields
impl Debug for SourceFields
Source§impl PartialEq for SourceFields
impl PartialEq for SourceFields
impl Eq for SourceFields
impl StructuralPartialEq for SourceFields
Auto Trait Implementations§
impl Freeze for SourceFields
impl RefUnwindSafe for SourceFields
impl Send for SourceFields
impl Sync for SourceFields
impl Unpin for SourceFields
impl UnsafeUnpin for SourceFields
impl UnwindSafe for SourceFields
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