pub struct WatchItem {
pub action: WatchAction,
pub exec: Option<ServiceHook>,
pub ignore: Option<BTreeSet<String>>,
pub include: Option<BTreeSet<String>>,
pub path: String,
pub target: Option<String>,
}Expand description
An element of the watch mode configuration.
See more: https://docs.docker.com/reference/compose-file/develop/#watch
Fields§
§action: WatchActionAction to take when a change is detected.
See more: https://docs.docker.com/reference/compose-file/develop/#action
exec: Option<ServiceHook>Requires: Docker Compose 2.32.2 and later
Only relevant when action is set to sync+exec. Like service hooks, exec is used to define the command to be run inside the container once it has started.
See more: https://docs.docker.com/reference/compose-file/develop/#exec
ignore: Option<BTreeSet<String>>Patterns to exclude from watching.
See more: https://docs.docker.com/reference/compose-file/develop/#ignore
include: Option<BTreeSet<String>>It is sometimes easier to select files to be watched instead of declaring those that shouldn’t be watched with ignore.
See more: https://docs.docker.com/reference/compose-file/develop/#include
path: StringDefines the path to source code (relative to the project directory) to monitor for changes. Updates to any file inside the path, which doesn’t match any ignore rule, triggers the configured action.
target: Option<String>Only applies when action is configured for sync. Files within path that have changes are synchronized with the container’s filesystem, so that the latter is always running with up-to-date content.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for WatchItem
impl<'de> Deserialize<'de> for WatchItem
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>,
Source§impl Ord for WatchItem
impl Ord for WatchItem
Source§impl PartialOrd for WatchItem
impl PartialOrd for WatchItem
impl Eq for WatchItem
impl StructuralPartialEq for WatchItem
Auto Trait Implementations§
impl Freeze for WatchItem
impl RefUnwindSafe for WatchItem
impl Send for WatchItem
impl Sync for WatchItem
impl Unpin for WatchItem
impl UnsafeUnpin for WatchItem
impl UnwindSafe for WatchItem
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
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
key and return true if they are equal.