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§
Sourcefn transport(&self) -> Box<dyn ImageTransport + Send + Sync>
fn transport(&self) -> Box<dyn ImageTransport + Send + Sync>
Returns the ImageTransport providing this Image Reference.
Sourcefn string_within_transport(&self) -> String
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.
Sourcefn new_image_source(&self) -> ImageResult<Box<dyn ImageSource + Send + Sync>>
fn new_image_source(&self) -> ImageResult<Box<dyn ImageSource + Send + Sync>>
Returns an Image Source from the Reference provided or an Error.
Provided Methods§
Sourcefn docker_reference(&self) -> Option<Box<dyn DockerImageReference>>
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".