Skip to main content

Params

Struct Params 

Source
pub struct Params { /* private fields */ }
Expand description

The complete resolved input to a projection, on the wire.

The values the configuration writes back, the record carries, and the projection renders from, with no precedence source.

Implementations§

Source§

impl Params

Source

pub fn from_record(record: &Manifest) -> Self

Reconstruct every projection parameter from the record alone, including the compatibility defaults applied when it was loaded.

Source

pub fn resolve( target: &Utf8Path, flags: &Inputs<'_>, config: Option<&Config>, record: Option<&Manifest>, purpose: Purpose, ) -> Result<Self, RkError>

Resolve flags, configuration, recorded compatibility inputs or observation, and finally the compiled defaults. Comparisons use from_record alone.

§Errors

Refuses unresolved identity, an invalid release state, or a style an existing target has not answered.

Source

pub const fn profile(&self) -> &ProfileSnapshot

What the project is.

Source

pub const fn git(&self) -> &GitWorkflow

The Git workflow parameters.

Source

pub const fn capabilities(&self) -> &CapabilityRequests

The capability requests.

Source

pub fn technologies(&self) -> &[String]

The technologies present, sorted.

Source

pub fn forge(&self) -> Option<&str>

The forge, where the project has one.

Source

pub const fn release_mode(&self) -> ReleaseMode

The release mode.

Source

pub fn driver(&self) -> Option<&str>

The release driver, for an automatic release.

Source

pub const fn style(&self) -> Option<Style>

The release style, for an automatic release that answered it.

Source

pub const fn nix_packaging(&self) -> bool

Whether this landing requested the Nix capability.

Source

pub const fn reporting_policy(&self) -> bool

Whether this landing requested the reporting policy.

Source

pub const fn scorecard(&self) -> bool

Whether this landing requested the Scorecard capability.

Source

pub const fn code_scanning(&self) -> Option<Provider>

The code scanning provider this landing requested, if any.

Source

pub fn repo(&self) -> &str

The project path used by parameter-bearing files, empty where the target has no forge repository.

Source

pub const fn checkout_mode(&self) -> CheckoutMode

Where a topic branch opens.

Source

pub const fn integration(&self) -> Integration

Which authority moves an implementation onto the trunk.

Source

pub fn trunk(&self) -> &str

The one permanent branch this landing writes into its artifacts.

Source

pub fn line_prefix(&self) -> &str

The release-line prefix this landing writes into its artifacts, the compiled default where the release intent carries none.

Source

pub fn security_contact(&self) -> &str

The contact the landed policy names, empty for the forge’s own authored wording.

Source

pub fn security_response(&self) -> &str

The acknowledgment window the landed policy promises.

Source

pub fn required_check(&self) -> &str

The check the release gate believes, empty where this target renders no gate that reads one.

Source

pub fn required_workflow(&self) -> &str

The workflow whose completion wakes the release gate, empty where this target renders no gate that waits on one.

Source

pub fn canonical_flags(&self) -> String

The canonical identity and Git workflow flags, as rk init and rk adopt take them: every resolved answer stated, so a follow-up command a preview prints applies the decision that was previewed.

Source

pub fn capability_flags(&self) -> String

Every opt-in capability’s flag, as rk init and rk adopt take it.

The resolved answers, not the flags the caller typed: a follow-up command a preview prints must apply the decision that was previewed, and the preview’s decision is what resolution produced.

Source

pub fn capability_toggles(&self) -> String

The same answers as rk upgrade takes them, every one stated.

An upgrade can turn a capability off as well as on, so absence is no answer there and each value is rendered explicitly. That is what makes a printed follow-up command reproduce the previewed decision rather than re-resolve the configured one.

Trait Implementations§

Source§

impl Clone for Params

Source§

fn clone(&self) -> Params

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for Params

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Eq for Params

Source§

impl From<&Params> for Parameters

Source§

fn from(params: &Params) -> Self

Converts to this type from the input type.
Source§

impl PartialEq for Params

Source§

fn eq(&self, other: &Params) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl StructuralPartialEq for Params

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

Source§

fn equivalent(&self, key: &K) -> bool

Checks if this value is equivalent to the given key. Read more
Source§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

Source§

fn equivalent(&self, key: &K) -> bool

Compare self to key and return true if they are equal.
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.