pub enum CloudPatch {
Text {
path: String,
content: String,
mode: Option<u32>,
replace: bool,
},
File {
path: String,
content: Vec<u8>,
mode: Option<u32>,
replace: bool,
},
CopyFile {
src: PathBuf,
dst: String,
mode: Option<u32>,
replace: bool,
},
CopyDir {
src: PathBuf,
dst: String,
replace: bool,
},
Symlink {
target: String,
link: String,
replace: bool,
},
Mkdir {
path: String,
mode: Option<u32>,
},
Remove {
path: String,
},
Append {
path: String,
content: String,
},
}Expand description
Rootfs patch applied before VM start. Twin of Patch, internally tagged
with a snake_case type instead of the domain’s external PascalCase tag.
Variants§
Text
Write text content to a file.
Fields
File
Write raw bytes to a file.
Fields
CopyFile
Copy a file from the host into the rootfs.
Fields
CopyDir
Copy a directory from the host into the rootfs.
Fields
Symlink
Create a symlink.
Fields
Mkdir
Create a directory.
Fields
Remove
Remove a file or directory.
Append
Append content to an existing file.
Trait Implementations§
Source§impl Clone for CloudPatch
impl Clone for CloudPatch
Source§fn clone(&self) -> CloudPatch
fn clone(&self) -> CloudPatch
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 CloudPatch
impl Debug for CloudPatch
Source§impl<'de> Deserialize<'de> for CloudPatch
impl<'de> Deserialize<'de> for CloudPatch
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 From<CloudPatch> for Patch
impl From<CloudPatch> for Patch
Source§fn from(patch: CloudPatch) -> Self
fn from(patch: CloudPatch) -> Self
Converts to this type from the input type.
Source§impl From<Patch> for CloudPatch
impl From<Patch> for CloudPatch
Auto Trait Implementations§
impl Freeze for CloudPatch
impl RefUnwindSafe for CloudPatch
impl Send for CloudPatch
impl Sync for CloudPatch
impl Unpin for CloudPatch
impl UnsafeUnpin for CloudPatch
impl UnwindSafe for CloudPatch
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