Skip to main content

ImageReference

Trait ImageReference 

Source
pub trait ImageReference: Debug {
    // Required methods
    fn transport(&self) -> Box<dyn ImageTransport + Send + Sync>;
    fn string_within_transport(&self) -> String;
    fn new_image_source(
        &self,
    ) -> ImageResult<Box<dyn ImageSource + Send + Sync>>;
    fn new_image(&self) -> ImageResult<Box<dyn Image + Send + Sync>>;

    // Provided method
    fn docker_reference(&self) -> Option<Box<dyn DockerImageReference>> { ... }
}
Expand description

A trait that should be implemented by All Image References

Required Methods§

Source

fn transport(&self) -> Box<dyn ImageTransport + Send + Sync>

Returns the ImageTransport providing this Image Reference.

Source

fn string_within_transport(&self) -> String

Returns the String within the transport that can be used to obtain the equivalent reference as the current reference.

Thus self.transport().parse_reference(self.string_within_reference()) will return a reference equivalent to the current reference.

Source

fn new_image_source(&self) -> ImageResult<Box<dyn ImageSource + Send + Sync>>

Returns an Image Source from the Reference provided or an Error.

Source

fn new_image(&self) -> ImageResult<Box<dyn Image + Send + Sync>>

Returns the Image

Provided Methods§

Source

fn docker_reference(&self) -> Option<Box<dyn DockerImageReference>>

Returns the DockerReference corresponding to this ImageReference

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§