pub struct ProviderContext<'a> {
pub version: &'a str,
pub artifacts: &'a [ProducedArtifact],
pub base_url: Option<&'a str>,
pub config: &'a Value,
pub work_dir: &'a Path,
pub secrets: &'a dyn SecretSource,
pub dry_run: bool,
}Expand description
Everything an adapter needs to run one publish: the release version, the artifacts produced by the run’s successful steps, the vendor-specific config blob, a scratch dir, a secret resolver, and the dry-run flag.
Fields§
§version: &'a strResolved release version (no leading v).
artifacts: &'a [ProducedArtifact]Artifacts collected from the run’s successful produces declarations.
base_url: Option<&'a str>Public-facing root for absolute URLs (e.g. https://releases.yah.dev).
config: &'a ValueVendor-specific config (the pipeline’s with = { ... } table), opaque
to the seam. Each adapter deserializes its own typed config from this.
work_dir: &'a PathScratch dir the adapter may write into (appcast XML, deltas, signed bundles). The caller owns its lifetime (a tempdir) and cleans it up.
secrets: &'a dyn SecretSourceCredential resolver over the secrets bridge.
dry_run: boolWhen true, validate + report intended actions only; perform no
network I/O and mutate no artifacts.
Implementations§
Source§impl ProviderContext<'_>
impl ProviderContext<'_>
Sourcepub fn require_secret(&self, slot: &str) -> Result<String, RunnerError>
pub fn require_secret(&self, slot: &str) -> Result<String, RunnerError>
Resolve a required slot, mapping a miss to a typed RunnerError so an
adapter can ?-propagate a missing-credential failure with a message
that names the slot and points at the secrets bridge.
Auto Trait Implementations§
impl<'a> !RefUnwindSafe for ProviderContext<'a>
impl<'a> !UnwindSafe for ProviderContext<'a>
impl<'a> Freeze for ProviderContext<'a>
impl<'a> Send for ProviderContext<'a>
impl<'a> Sync for ProviderContext<'a>
impl<'a> Unpin for ProviderContext<'a>
impl<'a> UnsafeUnpin for ProviderContext<'a>
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>, which can then be
downcast into Box<dyn ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>, which can then be further
downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.Source§impl<T> DowncastSend for T
impl<T> DowncastSend for T
Source§impl<T> DowncastSync for T
impl<T> DowncastSync for T
Source§impl<T> DowncastSync for T
impl<T> DowncastSync for T
impl<T> Fruit for T
impl<A, B, T> HttpServerConnExec<A, B> for Twhere
B: Body,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more