pub struct Service {Show 18 fields
pub name: String,
pub position: Position,
pub image: Option<String>,
pub image_pos: Option<Position>,
pub build: Option<ServiceBuild>,
pub build_pos: Option<Position>,
pub container_name: Option<String>,
pub container_name_pos: Option<Position>,
pub ports: Vec<ServicePort>,
pub ports_pos: Option<Position>,
pub volumes: Vec<ServiceVolume>,
pub volumes_pos: Option<Position>,
pub depends_on: Vec<String>,
pub depends_on_pos: Option<Position>,
pub environment: HashMap<String, String>,
pub pull_policy: Option<String>,
pub keys: Vec<String>,
pub raw: Option<Yaml>,
}Expand description
A service definition.
Fields§
§name: StringService name.
position: PositionPosition of the service definition.
image: Option<String>The image to use.
image_pos: Option<Position>Position of the image field.
build: Option<ServiceBuild>Build configuration.
build_pos: Option<Position>Position of the build field.
container_name: Option<String>Container name.
container_name_pos: Option<Position>Position of the container_name field.
ports: Vec<ServicePort>Port mappings.
ports_pos: Option<Position>Position of the ports field.
volumes: Vec<ServiceVolume>Volume mounts.
volumes_pos: Option<Position>Position of the volumes field.
depends_on: Vec<String>Service dependencies.
depends_on_pos: Option<Position>Position of the depends_on field.
environment: HashMap<String, String>Environment variables.
pull_policy: Option<String>Pull policy (for build+image combinations).
keys: Vec<String>All keys in this service (for ordering rules).
raw: Option<Yaml>Raw YAML for this service.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Service
impl RefUnwindSafe for Service
impl Send for Service
impl Sync for Service
impl Unpin for Service
impl UnwindSafe for Service
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,
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> 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 moreCreates a shared type from an unshared type.