pub struct Service { /* private fields */ }Expand description
A source-aware typed Compose service.
Implementations§
Source§impl Service
impl Service
Sourcepub const fn span(&self) -> SourceSpan
pub const fn span(&self) -> SourceSpan
Returns the complete service definition span.
Sourcepub const fn image(&self) -> Option<&Located<ImageReference>>
pub const fn image(&self) -> Option<&Located<ImageReference>>
Returns the explicitly authored image reference.
Sourcepub const fn command(&self) -> Option<&Command>
pub const fn command(&self) -> Option<&Command>
Returns the command without normalizing its authored form.
Sourcepub const fn environment(&self) -> Option<&Environment>
pub const fn environment(&self) -> Option<&Environment>
Returns environment variables with list and mapping forms kept distinct.
Sourcepub const fn extra_hosts(&self) -> Option<&ExtraHosts>
pub const fn extra_hosts(&self) -> Option<&ExtraHosts>
Returns additional host mappings with short and long forms retained.
Sourcepub const fn user(&self) -> Option<&UserSpec>
pub const fn user(&self) -> Option<&UserSpec>
Returns the raw-preserving container user/group value.
Sourcepub const fn userns_mode(&self) -> Option<&UserNamespaceMode>
pub const fn userns_mode(&self) -> Option<&UserNamespaceMode>
Returns the raw-preserving user-namespace mode.
Sourcepub const fn ulimits(&self) -> Option<&Ulimits>
pub const fn ulimits(&self) -> Option<&Ulimits>
Returns explicitly authored service resource limits.
Sourcepub const fn depends_on(&self) -> Option<&DependsOn>
pub const fn depends_on(&self) -> Option<&DependsOn>
Returns service dependencies with short and long forms retained.
Sourcepub const fn healthcheck(&self) -> Option<&Healthcheck>
pub const fn healthcheck(&self) -> Option<&Healthcheck>
Returns the service health-check definition.
Sourcepub const fn build(&self) -> Option<&Build>
pub const fn build(&self) -> Option<&Build>
Returns the build declaration with short and long forms retained.
Sourcepub const fn deploy(&self) -> Option<&DeployDefinition>
pub const fn deploy(&self) -> Option<&DeployDefinition>
Returns independently classified deploy subfields.
Sourcepub fn volumes(&self) -> &[VolumeMount]
pub fn volumes(&self) -> &[VolumeMount]
Returns service-volume mounts in authored order.
Sourcepub const fn networks(&self) -> Option<&ServiceNetworks>
pub const fn networks(&self) -> Option<&ServiceNetworks>
Returns service network attachments with short and long forms kept distinct.
Sourcepub fn configs(&self) -> &[ConfigGrant]
pub fn configs(&self) -> &[ConfigGrant]
Returns service config grants in authored order.
Sourcepub fn secrets(&self) -> &[SecretGrant]
pub fn secrets(&self) -> &[SecretGrant]
Returns service secret grants in authored order.
Sourcepub fn extension_fields(&self) -> &[FieldReference]
pub fn extension_fields(&self) -> &[FieldReference]
Returns retained service x- extension fields.
Sourcepub fn unknown_fields(&self) -> &[FieldReference]
pub fn unknown_fields(&self) -> &[FieldReference]
Returns service fields not yet represented by the typed subset.