pub struct MachineFile {
pub path: String,
pub source: Option<String>,
pub content: Option<String>,
pub uid: Option<u32>,
pub gid: Option<u32>,
pub mode: Option<String>,
}Expand description
A file placed on the machine before its workload runs: a container gets it from its runtime
(a Compose config, a Kubernetes ConfigMap), a VM from its set-up. On Compose, a project file
with an owner or a mode is read into Compose’s environment by isoloom run and copied in.
Fields§
§path: StringWhere the file goes in the machine: an absolute path (/etc/app/app.ini). Its folders
are created when missing.
source: Option<String>The file to copy, from the project folder (config/app.ini). Give this or content.
content: Option<String>The file’s text, written in the spec. Give this or source.
uid: Option<u32>The user id that owns the file (default 0, root). Linux machines only.
gid: Option<u32>The group id that owns the file (default 0, root). Linux machines only.
mode: Option<String>The file’s permissions, in octal (0600, 0755; default 0644), quoted or not: the
digits are kept as written. Linux machines only.
Implementations§
Source§impl MachineFile
impl MachineFile
Sourcepub fn mode_or_default(&self) -> &str
pub fn mode_or_default(&self) -> &str
Its mode, the default when the spec gives none.
Sourcepub fn sets_owner_or_mode(&self) -> bool
pub fn sets_owner_or_mode(&self) -> bool
Whether the spec sets its owner or its mode.
Trait Implementations§
Source§impl Clone for MachineFile
impl Clone for MachineFile
Source§impl Debug for MachineFile
impl Debug for MachineFile
Source§impl<'de> Deserialize<'de> for MachineFile
impl<'de> Deserialize<'de> for MachineFile
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>,
impl Eq for MachineFile
Source§impl JsonSchema for MachineFile
impl JsonSchema for MachineFile
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Source§fn inline_schema() -> bool
fn inline_schema() -> bool
$ref keyword. Read moreSource§impl PartialEq for MachineFile
impl PartialEq for MachineFile
Source§impl Serialize for MachineFile
impl Serialize for MachineFile
impl StructuralPartialEq for MachineFile
Auto Trait Implementations§
impl Freeze for MachineFile
impl RefUnwindSafe for MachineFile
impl Send for MachineFile
impl Sync for MachineFile
impl Unpin for MachineFile
impl UnsafeUnpin for MachineFile
impl UnwindSafe for MachineFile
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,
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
key and return true if they are equal.