#[non_exhaustive]pub struct LocationParameters {
pub submodules: Option<bool>,
pub shallow: Option<bool>,
pub lfs: Option<bool>,
pub export_ignore: Option<bool>,
pub all_refs: Option<bool>,
pub verify_commit: Option<bool>,
pub keytype: Option<String>,
pub public_key: Option<String>,
pub public_keys: Option<String>,
/* private fields */
}Expand description
Query-string parameters that decorate a FlakeRef.
Notably absent: ref and rev. Those are typed slots on the FlakeRef’s
kind (crate::FlakeRefType::GitForge / crate::FlakeRefType::Indirect)
there is one source of truth for ref/rev, and it is not here. The parser
extracts ?ref= / ?rev= values out of the query string and routes them
into those typed slots, setting the kind’s RefLocation to
QueryParameter so round-trip Display preserves the form.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.submodules: Option<bool>Fetch git submodules during clone. Mirrors Nix’s git fetcher
submodules setting; URL-time coercion is strict (value == "1"),
so the parser accepts "1" / "0" and rejects anything else.
shallow: Option<bool>Use a shallow clone (skip git history). Mirrors Nix’s git fetcher
shallow setting; URL-time coercion follows the same rule as
Self::submodules.
lfs: Option<bool>Git-LFS support. Boolean values follow Nix’s URL-time coercion:
"1" -> true, "0" -> false; anything else (including
"true" / "false") is rejected at parse time so the diagnostic
stays visible.
export_ignore: Option<bool>Honour .gitattributes export-ignore directives during fetch.
all_refs: Option<bool>Fetch all refs, not just the requested one.
verify_commit: Option<bool>Verify the commit signature against the configured key set.
keytype: Option<String>Signature key type (e.g. ssh-ed25519). Stored as a free-form
string because Nix does not enumerate valid values.
public_key: Option<String>Public key bytes used to verify commit signatures.
public_keys: Option<String>Multi-key bag (Nix uses a single string with platform-specific delimiters).
Implementations§
Source§impl LocationParameters
impl LocationParameters
Sourcepub fn dir(&mut self, dir: Option<String>) -> &mut Self
pub fn dir(&mut self, dir: Option<String>) -> &mut Self
Chainable setter for the dir parameter; returns &mut Self so the
builder form (params.dir(Some(...)).host(Some(...))) reads naturally.
Sourcepub fn nar_hash(&mut self, nar_hash: Option<String>) -> &mut Self
pub fn nar_hash(&mut self, nar_hash: Option<String>) -> &mut Self
Chainable setter for the narHash parameter. See Self::dir.
Sourcepub fn host(&mut self, host: Option<String>) -> &mut Self
pub fn host(&mut self, host: Option<String>) -> &mut Self
Chainable setter for the host parameter. See Self::dir.
Sourcepub fn set_dir(&mut self, dir: Option<String>)
pub fn set_dir(&mut self, dir: Option<String>)
Replace the dir parameter (a flake’s subdirectory inside its repo).
Sourcepub fn set_nar_hash(&mut self, nar_hash: Option<String>)
pub fn set_nar_hash(&mut self, nar_hash: Option<String>)
Replace the narHash parameter (SRI-format NAR hash).
Sourcepub fn set_host(&mut self, host: Option<String>)
pub fn set_host(&mut self, host: Option<String>)
Replace the host parameter (used to override the default host for
kinds that resolve to a forge or remote URL).
Sourcepub fn rev_count_mut(&mut self) -> &mut Option<String>
pub fn rev_count_mut(&mut self) -> &mut Option<String>
Mutable handle to the revCount slot for in-place edits.
Sourcepub fn set_last_modified(&mut self, last_modified: Option<String>)
pub fn set_last_modified(&mut self, last_modified: Option<String>)
Replace the lastModified parameter (Unix timestamp of the source).
Sourcepub fn set_rev_count(&mut self, rev_count: Option<String>)
pub fn set_rev_count(&mut self, rev_count: Option<String>)
Replace the revCount parameter (commit count from the repo root).
Sourcepub fn set_submodules(&mut self, submodules: Option<bool>)
pub fn set_submodules(&mut self, submodules: Option<bool>)
Replace the submodules boolean parameter.
Sourcepub fn set_shallow(&mut self, shallow: Option<bool>)
pub fn set_shallow(&mut self, shallow: Option<bool>)
Replace the shallow boolean parameter.
Sourcepub fn set_export_ignore(&mut self, export_ignore: Option<bool>)
pub fn set_export_ignore(&mut self, export_ignore: Option<bool>)
Replace the exportIgnore boolean parameter.
Sourcepub fn set_all_refs(&mut self, all_refs: Option<bool>)
pub fn set_all_refs(&mut self, all_refs: Option<bool>)
Replace the allRefs boolean parameter.
Sourcepub fn set_verify_commit(&mut self, verify_commit: Option<bool>)
pub fn set_verify_commit(&mut self, verify_commit: Option<bool>)
Replace the verifyCommit boolean parameter.
Sourcepub fn set_keytype(&mut self, keytype: Option<String>)
pub fn set_keytype(&mut self, keytype: Option<String>)
Replace the keytype parameter (signature key type).
Sourcepub fn set_public_key(&mut self, public_key: Option<String>)
pub fn set_public_key(&mut self, public_key: Option<String>)
Replace the publicKey parameter.
Sourcepub fn set_public_keys(&mut self, public_keys: Option<String>)
pub fn set_public_keys(&mut self, public_keys: Option<String>)
Replace the publicKeys parameter.
Sourcepub fn add_arbitrary(&mut self, arbitrary: (String, String))
pub fn add_arbitrary(&mut self, arbitrary: (String, String))
Append a (key, value) pair to the unrecognised-parameter vec.
Used by the parser for keys that do not match a typed slot; rendered
verbatim by Display to keep round-trip parity.
Trait Implementations§
Source§impl Clone for LocationParameters
impl Clone for LocationParameters
Source§fn clone(&self) -> LocationParameters
fn clone(&self) -> LocationParameters
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for LocationParameters
impl Debug for LocationParameters
Source§impl Default for LocationParameters
impl Default for LocationParameters
Source§fn default() -> LocationParameters
fn default() -> LocationParameters
Source§impl<'de> Deserialize<'de> for LocationParameters
impl<'de> Deserialize<'de> for LocationParameters
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>,
Source§impl Display for LocationParameters
impl Display for LocationParameters
Source§impl PartialEq for LocationParameters
impl PartialEq for LocationParameters
Source§fn eq(&self, other: &LocationParameters) -> bool
fn eq(&self, other: &LocationParameters) -> bool
self and other values to be equal, and is used by ==.