Struct specifications::container::LocalContainerInfo
source · pub struct LocalContainerInfo {
pub name: String,
pub kind: PackageKind,
pub entrypoint: Entrypoint,
pub actions: HashMap<String, Action>,
pub types: HashMap<String, Type>,
}
Expand description
Specifies the contents of a contaienr info YAML file that is inside the container itself.
Fields§
§name: String
The name of the package
kind: PackageKind
The kind of the package
entrypoint: Entrypoint
The entrypoint to the package
actions: HashMap<String, Action>
The list of actions that this package can do.
types: HashMap<String, Type>
The list of types that are declared in this package.
Implementations§
source§impl LocalContainerInfo
impl LocalContainerInfo
sourcepub fn from_path<P: AsRef<Path>>(
path: P,
) -> Result<Self, LocalContainerInfoError>
pub fn from_path<P: AsRef<Path>>( path: P, ) -> Result<Self, LocalContainerInfoError>
Constructor for the LocalContainerInfo that constructs it from the given path.
Generic types
P
: The Path-like type of the path given.
Arguments
path
: the Path to read the new LocalContainerInfo from.
Returns
A new LocalContainerInfo on success, or else a LocalContainerInfoError.
sourcepub fn from_reader<R: Read>(reader: R) -> Result<Self, LocalContainerInfoError>
pub fn from_reader<R: Read>(reader: R) -> Result<Self, LocalContainerInfoError>
Constructor for the LocalContainerInfo that constructs it from the given reader.
Generic types
R
: The type of the reader, which implements Read.
Arguments
reader
: The reader to read from. Will be consumed.
Returns
A new LocalContainerInfo on success, or else a LocalContainerInfoError.
sourcepub fn to_path<P: AsRef<Path>>(
&self,
path: P,
) -> Result<(), LocalContainerInfoError>
pub fn to_path<P: AsRef<Path>>( &self, path: P, ) -> Result<(), LocalContainerInfoError>
Writes the LocalContainerInfo 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 LocalContainerInfoError otherwise.
sourcepub fn to_writer<W: Write>(
&self,
writer: W,
) -> Result<(), LocalContainerInfoError>
pub fn to_writer<W: Write>( &self, writer: W, ) -> Result<(), LocalContainerInfoError>
Writes the LocalContainerInfo 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 LocalContainerInfoError otherwise.
Trait Implementations§
source§impl Clone for LocalContainerInfo
impl Clone for LocalContainerInfo
source§fn clone(&self) -> LocalContainerInfo
fn clone(&self) -> LocalContainerInfo
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for LocalContainerInfo
impl Debug for LocalContainerInfo
source§impl<'de> Deserialize<'de> for LocalContainerInfo
impl<'de> Deserialize<'de> for LocalContainerInfo
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
source§impl From<&ContainerInfo> for LocalContainerInfo
impl From<&ContainerInfo> for LocalContainerInfo
source§fn from(container_info: &ContainerInfo) -> Self
fn from(container_info: &ContainerInfo) -> Self
source§impl From<ContainerInfo> for LocalContainerInfo
impl From<ContainerInfo> for LocalContainerInfo
source§fn from(container_info: ContainerInfo) -> Self
fn from(container_info: ContainerInfo) -> Self
Auto Trait Implementations§
impl Freeze for LocalContainerInfo
impl RefUnwindSafe for LocalContainerInfo
impl Send for LocalContainerInfo
impl Sync for LocalContainerInfo
impl Unpin for LocalContainerInfo
impl UnwindSafe for LocalContainerInfo
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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)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> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T
in a tonic::Request