Skip to main content

Artifact

Struct Artifact 

Source
#[non_exhaustive]
pub struct Artifact { pub artifact_type: String, pub device_id: Option<Uuid>, pub download_url: String, pub id: Uuid, pub platform: String, pub version_id: Option<Uuid>, pub version_range_pattern: Option<String>, }
Expand description

A downloadable artifact belonging to a release version: an installer, package, or other file published for a given type and platform.

JSON schema
{
 "description": "A downloadable artifact belonging to a release version: an installer,\npackage, or other file published for a given type and platform.",
 "type": "object",
 "required": [
   "artifact_type",
   "download_url",
   "id",
   "platform"
 ],
 "properties": {
   "artifact_type": {
     "description": "What kind of artifact this is (e.g. an installer or package name).",
     "type": "string"
   },
   "device_id": {
     "description": "The device that registered this artifact, if it was registered by a\nreleaser device rather than created by an operator.",
     "type": [
       "string",
       "null"
     ],
     "format": "uuid"
   },
   "download_url": {
     "description": "URL the artifact can be downloaded from.",
     "type": "string"
   },
   "id": {
     "description": "Unique identifier of the artifact.",
     "type": "string",
     "format": "uuid"
   },
   "platform": {
     "description": "The platform the artifact targets (e.g. an OS or architecture name).",
     "type": "string"
   },
   "version_id": {
     "description": "The exact version this artifact belongs to. `null` for range\nartifacts, which apply to every version matching\n`version_range_pattern` instead.",
     "type": [
       "string",
       "null"
     ],
     "format": "uuid"
   },
   "version_range_pattern": {
     "description": "Semver range this artifact applies to (e.g. `^2.10.0`), for artifacts\nshared across a range of versions rather than pinned to one. `null`\nfor exact-version artifacts.",
     "type": [
       "string",
       "null"
     ]
   }
 }
}

Fields (Non-exhaustive)§

This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.
§artifact_type: String

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

§device_id: Option<Uuid>

The device that registered this artifact, if it was registered by a releaser device rather than created by an operator.

§download_url: String

URL the artifact can be downloaded from.

§id: Uuid

Unique identifier of the artifact.

§platform: String

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

§version_id: Option<Uuid>

The exact version this artifact belongs to. null for range artifacts, which apply to every version matching version_range_pattern instead.

§version_range_pattern: Option<String>

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.

Implementations§

Source§

impl Artifact

Source

pub fn builder() -> ArtifactBuilder

Create an instance of Artifact using the builder syntax

Trait Implementations§

Source§

impl Clone for Artifact

Source§

fn clone(&self) -> Artifact

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 Artifact

Source§

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

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

impl<'de> Deserialize<'de> for Artifact

Source§

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 Serialize for Artifact

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more

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<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,

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