Skip to main content

ArtifactBuilder

Struct ArtifactBuilder 

Source
pub struct ArtifactBuilder<S: State = Empty> { /* private fields */ }
Expand description

Use builder syntax to set the inputs and finish with build().

Implementations§

Source§

impl<S: State> ArtifactBuilder<S>

Source

pub fn build(self) -> Artifact
where S: IsComplete,

Finish building and return the requested object

Source

pub fn artifact_type(self, value: String) -> ArtifactBuilder<SetArtifactType<S>>
where S::ArtifactType: IsUnset,

Required.

What kind of artifact this is (e.g. an installer or package name).

Source

pub fn device_id(self, value: Uuid) -> ArtifactBuilder<SetDeviceId<S>>
where S::DeviceId: IsUnset,

Optional (Some / Option setters). The device that registered this artifact, if it was registered by a releaser device rather than created by an operator.

Source

pub fn maybe_device_id( self, value: Option<Uuid>, ) -> ArtifactBuilder<SetDeviceId<S>>
where S::DeviceId: IsUnset,

Optional (Some / Option setters). The device that registered this artifact, if it was registered by a releaser device rather than created by an operator.

Source

pub fn download_url(self, value: String) -> ArtifactBuilder<SetDownloadUrl<S>>
where S::DownloadUrl: IsUnset,

Required.

URL the artifact can be downloaded from.

Source

pub fn id(self, value: Uuid) -> ArtifactBuilder<SetId<S>>
where S::Id: IsUnset,

Required.

Unique identifier of the artifact.

Source

pub fn platform(self, value: String) -> ArtifactBuilder<SetPlatform<S>>
where S::Platform: IsUnset,

Required.

The platform the artifact targets (e.g. an OS or architecture name).

Source

pub fn version_id(self, value: Uuid) -> ArtifactBuilder<SetVersionId<S>>
where S::VersionId: IsUnset,

Optional (Some / Option setters). The exact version this artifact belongs to. null for range artifacts, which apply to every version matching version_range_pattern instead.

Source

pub fn maybe_version_id( self, value: Option<Uuid>, ) -> ArtifactBuilder<SetVersionId<S>>
where S::VersionId: IsUnset,

Optional (Some / Option setters). The exact version this artifact belongs to. null for range artifacts, which apply to every version matching version_range_pattern instead.

Source

pub fn version_range_pattern( self, value: String, ) -> ArtifactBuilder<SetVersionRangePattern<S>>
where S::VersionRangePattern: IsUnset,

Optional (Some / Option setters). Semver range this artifact applies to (e.g. ^2.10.0), for artifacts shared across a range of versions rather than pinned to one. null for exact-version artifacts.

Source

pub fn maybe_version_range_pattern( self, value: Option<String>, ) -> ArtifactBuilder<SetVersionRangePattern<S>>
where S::VersionRangePattern: IsUnset,

Optional (Some / Option setters). Semver range this artifact applies to (e.g. ^2.10.0), for artifacts shared across a range of versions rather than pinned to one. null for exact-version artifacts.

Auto Trait Implementations§

§

impl<S> Freeze for ArtifactBuilder<S>
where PhantomData<(fn() -> S, fn() -> PhantomData<Artifact>)>: Freeze,

§

impl<S> RefUnwindSafe for ArtifactBuilder<S>

§

impl<S> Send for ArtifactBuilder<S>
where PhantomData<(fn() -> S, fn() -> PhantomData<Artifact>)>: Send,

§

impl<S> Sync for ArtifactBuilder<S>
where PhantomData<(fn() -> S, fn() -> PhantomData<Artifact>)>: Sync,

§

impl<S> Unpin for ArtifactBuilder<S>
where PhantomData<(fn() -> S, fn() -> PhantomData<Artifact>)>: Unpin,

§

impl<S> UnsafeUnpin for ArtifactBuilder<S>
where PhantomData<(fn() -> S, fn() -> PhantomData<Artifact>)>: UnsafeUnpin,

§

impl<S> UnwindSafe for ArtifactBuilder<S>
where PhantomData<(fn() -> S, fn() -> PhantomData<Artifact>)>: UnwindSafe,

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> 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, 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.