pub struct DockerImage { /* private fields */ }Expand description
Docker image reference with repository and tag
Represents an image reference of the form repository:tag,
e.g. torrust/tracker:develop or mysql:8.4.
Implementations§
Source§impl DockerImage
impl DockerImage
Sourcepub fn new(repository: impl Into<String>, tag: impl Into<String>) -> Self
pub fn new(repository: impl Into<String>, tag: impl Into<String>) -> Self
Creates a new Docker image reference
§Examples
use torrust_tracker_deployer_lib::shared::docker_image::DockerImage;
let image = DockerImage::new("torrust/tracker", "develop");
assert_eq!(image.repository(), "torrust/tracker");
assert_eq!(image.tag(), "develop");Sourcepub fn repository(&self) -> &str
pub fn repository(&self) -> &str
Returns the repository name (e.g. "torrust/tracker")
Sourcepub fn full_reference(&self) -> String
pub fn full_reference(&self) -> String
Returns the full image reference as repository:tag
§Examples
use torrust_tracker_deployer_lib::shared::docker_image::DockerImage;
let image = DockerImage::new("mysql", "8.4");
assert_eq!(image.full_reference(), "mysql:8.4");Trait Implementations§
Source§impl Clone for DockerImage
impl Clone for DockerImage
Source§impl Debug for DockerImage
impl Debug for DockerImage
Source§impl<'de> Deserialize<'de> for DockerImage
impl<'de> Deserialize<'de> for DockerImage
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>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Display for DockerImage
impl Display for DockerImage
impl Eq for DockerImage
Source§impl PartialEq for DockerImage
impl PartialEq for DockerImage
Source§impl Serialize for DockerImage
impl Serialize for DockerImage
impl StructuralPartialEq for DockerImage
Auto Trait Implementations§
impl Freeze for DockerImage
impl RefUnwindSafe for DockerImage
impl Send for DockerImage
impl Sync for DockerImage
impl Unpin for DockerImage
impl UnsafeUnpin for DockerImage
impl UnwindSafe for DockerImage
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
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.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> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§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>
Wrap the input message
T in a tonic::RequestSource§impl<T> IntoResult<T> for T
impl<T> IntoResult<T> for T
type Err = !
fn into_result(self) -> Result<T, <T as IntoResult<T>>::Err>
Source§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
Source§impl<T> ToStringFallible for Twhere
T: Display,
impl<T> ToStringFallible for Twhere
T: Display,
Source§fn try_to_string(&self) -> Result<String, TryReserveError>
fn try_to_string(&self) -> Result<String, TryReserveError>
ToString::to_string, but without panic on OOM.