pub struct ServiceHook {
pub privileged: Option<bool>,
pub user: Option<String>,
pub working_dir: Option<String>,
pub environment: Option<ListOrMap>,
pub command: Option<StringOrList>,
}Expand description
Configuration for service lifecycle hooks, which are commands executed at specific points in a container’s lifecycle.
See more: https://docs.docker.com/compose/how-tos/lifecycle/
Fields§
§privileged: Option<bool>Whether to run the command with extended privileges.
user: Option<String>User to run the command as.
working_dir: Option<String>Working directory for the command.
environment: Option<ListOrMap>Environment variables for the command.
command: Option<StringOrList>Command to execute as part of the hook.
Trait Implementations§
Source§impl Clone for ServiceHook
impl Clone for ServiceHook
Source§fn clone(&self) -> ServiceHook
fn clone(&self) -> ServiceHook
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ServiceHook
impl Debug for ServiceHook
Source§impl Default for ServiceHook
impl Default for ServiceHook
Source§fn default() -> ServiceHook
fn default() -> ServiceHook
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for ServiceHookwhere
ServiceHook: Default,
impl<'de> Deserialize<'de> for ServiceHookwhere
ServiceHook: Default,
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 PartialEq for ServiceHook
impl PartialEq for ServiceHook
Source§impl Serialize for ServiceHook
impl Serialize for ServiceHook
impl Eq for ServiceHook
impl StructuralPartialEq for ServiceHook
Auto Trait Implementations§
impl Freeze for ServiceHook
impl RefUnwindSafe for ServiceHook
impl Send for ServiceHook
impl Sync for ServiceHook
impl Unpin for ServiceHook
impl UnsafeUnpin for ServiceHook
impl UnwindSafe for ServiceHook
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<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.