#[non_exhaustive]pub enum FlakeRefType {
File {
url: String,
},
Git {
url: String,
type: UrlType,
},
GitHub {
owner: String,
repo: String,
ref_or_rev: Option<String>,
},
GitLab {
owner: String,
repo: String,
ref_or_rev: Option<String>,
},
Indirect {
id: String,
ref_or_rev: Option<String>,
},
Mercurial {
url: String,
type: UrlType,
},
Path {
path: String,
},
Sourcehut {
owner: String,
repo: String,
ref_or_rev: Option<String>,
},
Tarball {
url: String,
type: UrlType,
},
None,
}
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
File
Git
Git repositories. The location of the repository is specified by the attribute
url
. The ref
arrribute defaults to resolving the HEAD
reference.
The rev
attribute must exist in the branch or tag specified by ref
, defaults
to ref
.
GitHub
GitLab
Indirect
Mercurial
Path
Path must be a directory in the filesystem containing a flake.nix
.
Path must be an absolute path.
Sourcehut
Tarball
None
Implementations§
Source§impl FlakeRefType
impl FlakeRefType
Sourcepub fn parse_type(input: &str) -> NixUriResult<FlakeRefType>
pub fn parse_type(input: &str) -> NixUriResult<FlakeRefType>
Parse type specific information, returns the FlakeRefType
and the unparsed input
pub fn get_repo(&self) -> Option<String>
pub fn get_owner(&self) -> Option<String>
pub fn ref_or_rev( &mut self, ref_or_rev_alt: Option<String>, ) -> Result<(), NixUriError>
Trait Implementations§
Source§impl Clone for FlakeRefType
impl Clone for FlakeRefType
Source§fn clone(&self) -> FlakeRefType
fn clone(&self) -> FlakeRefType
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 FlakeRefType
impl Debug for FlakeRefType
Source§impl Default for FlakeRefType
impl Default for FlakeRefType
Source§fn default() -> FlakeRefType
fn default() -> FlakeRefType
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for FlakeRefType
impl<'de> Deserialize<'de> for FlakeRefType
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 FlakeRefType
impl Display for FlakeRefType
Source§impl PartialEq for FlakeRefType
impl PartialEq for FlakeRefType
Source§impl Serialize for FlakeRefType
impl Serialize for FlakeRefType
impl Eq for FlakeRefType
impl StructuralPartialEq for FlakeRefType
Auto Trait Implementations§
impl Freeze for FlakeRefType
impl RefUnwindSafe for FlakeRefType
impl Send for FlakeRefType
impl Sync for FlakeRefType
impl Unpin for FlakeRefType
impl UnwindSafe for FlakeRefType
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