pub struct ContainerInfo {
Show 15 fields pub name: String, pub version: Version, pub kind: PackageKind, pub owners: Option<Vec<String>>, pub description: Option<String>, pub actions: HashMap<String, Action>, pub entrypoint: Entrypoint, pub types: Option<HashMap<String, Type>>, pub base: Option<String>, pub dependencies: Option<Vec<String>>, pub environment: Option<HashMap<String, String>>, pub files: Option<Vec<String>>, pub initialize: Option<Vec<String>>, pub install: Option<Vec<String>>, pub unpack: Option<Vec<String>>,
}
Expand description

Specifies the contents of a container info YAML file. Note that this is only the file the user creates.

Fields§

§name: String

The name/programming ID of this package.

§version: Version

The version of this package.

§kind: PackageKind

The kind of this package.

§owners: Option<Vec<String>>

The list of owners of this package.

§description: Option<String>

A short description of the package.

§actions: HashMap<String, Action>

The functions that this package supports.

§entrypoint: Entrypoint

The entrypoint of the image

§types: Option<HashMap<String, Type>>

The types that this package adds.

§base: Option<String>

The base image to use for the package image.

§dependencies: Option<Vec<String>>

The dependencies, as install commands for sudo apt-get install -y <…>

§environment: Option<HashMap<String, String>>

Any environment variables that the user wants to be set

§files: Option<Vec<String>>

The list of additional files to copy to the image

§initialize: Option<Vec<String>>

An extra script to run to initialize the working directory

§install: Option<Vec<String>>

An extra set of commands that will be run before the workspace is copied over. Useful for non-standard general dependencies.

§unpack: Option<Vec<String>>

An extra set of commands that will be run after the workspace is copied over. Useful for preprocessing or unpacking things.

Implementations§

source§

impl ContainerInfo

source

pub fn from_path<P: AsRef<Path>>( path: P ) -> Result<ContainerInfo, ContainerInfoError>

Edited: now returning ContainerInfoErrors.

Returns a ContainerInfo by constructing it from the file at the given path.

Generic types

  • P: The Path-like type of the given target location.

Arguments

  • path: The path to the container info file.

Returns
The newly constructed ContainerInfo instance on success, or a ContainerInfoError upon failure.

source

pub fn from_reader<R: Read>(r: R) -> Result<ContainerInfo, ContainerInfoError>

Edited: now returning ContainerInfoErrors.

Returns a ContainerInfo by constructing it from the given Reader with YAML text.

Arguments

  • r: The reader with the contents of the raw YAML file.

Returns
The newly constructed ContainerInfo instance on success, or a ContainerInfoError upon failure.

source

pub fn from_string( contents: String ) -> Result<ContainerInfo, ContainerInfoError>

Edited: now returning ContainerInfoErrors.

Returns a ContainerInfo by constructing it from the given string of YAML text.

Arguments

  • contents: The text contents of a raw YAML file.

Returns
The newly constructed ContainerInfo instance on success, or a ContainerInfoError upon failure.

source

pub fn to_path<P: AsRef<Path>>(&self, path: P) -> Result<(), ContainerInfoError>

Writes the ContainerInfo to the given location.

Generic types

  • P: The Path-like type of the given target location.

Arguments

  • path: The target location to write to the LocalContainerInfo to.

Returns
Nothing on success, or a ContainerInfoError otherwise.

source

pub fn to_writer<W: Write>(&self, writer: W) -> Result<(), ContainerInfoError>

Writes the ContainerInfo to the given writer.

Generic types

  • W: The type of the writer, which implements Write.

Arguments

  • writer: The writer to write to. Will be consumed.

Returns
Nothing on success, or a ContainerInfoError otherwise.

Trait Implementations§

source§

impl Clone for ContainerInfo

source§

fn clone(&self) -> ContainerInfo

Returns a copy of the value. Read more
1.0.0 · source§

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

Performs copy-assignment from source. Read more
source§

impl Debug for ContainerInfo

source§

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

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

impl<'de> Deserialize<'de> for ContainerInfo

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 From<&ContainerInfo> for LocalContainerInfo

source§

fn from(container_info: &ContainerInfo) -> Self

Converts to this type from the input type.
source§

impl From<&ContainerInfo> for PackageInfo

source§

fn from(container: &ContainerInfo) -> Self

Converts to this type from the input type.
source§

impl From<ContainerInfo> for LocalContainerInfo

source§

fn from(container_info: ContainerInfo) -> Self

Converts to this type from the input type.
source§

impl From<ContainerInfo> for PackageInfo

source§

fn from(container: ContainerInfo) -> Self

Converts to this type from the input type.
source§

impl Serialize for ContainerInfo

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 Twhere T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

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

const: unstable · source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

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

const: unstable · source§

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

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

const: unstable · source§

fn from(t: T) -> T

Returns the argument unchanged.

§

impl<T> FromRef<T> for Twhere T: Clone,

§

fn from_ref(input: &T) -> T

Converts to this type from a reference to the input type.
source§

impl<T> Instrument for T

source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
source§

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

const: unstable · 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> IntoRequest<T> for T

source§

fn into_request(self) -> Request<T>

Wrap the input message T in a tonic::Request
source§

impl<T> ToOwned for Twhere T: Clone,

§

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 Twhere U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
const: unstable · source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

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

§

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

The type returned in the event of a conversion error.
const: unstable · source§

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

Performs the conversion.
§

impl<V, T> VZip<V> for Twhere V: MultiLane<T>,

§

fn vzip(self) -> V

source§

impl<T> WithSubscriber for T

source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more
source§

impl<T> DeserializeOwned for Twhere T: for<'de> Deserialize<'de>,