pub struct VolumeSpec {
pub mount_type: MountType,
pub source: String,
pub target: String,
pub read_only: bool,
pub external: bool,
pub pool: Option<String>,
pub owner: Option<String>,
pub mode: Option<String>,
pub device: Option<String>,
pub volume: VolumeOptions,
pub options: BTreeMap<String, String>,
}Expand description
A mount. Written as SOURCE:TARGET[:OPTIONS] or as the long form
(VolumeMount in the schema); always serialized in the long form.
Fields§
§mount_type: MountTypebind (a host path) or volume (a named volume).
source: StringHost path (bind) or volume key (volume).
target: StringAbsolute path inside the guest.
read_only: bool§external: bool§pool: Option<String>§owner: Option<String>§mode: Option<String>§device: Option<String>§volume: VolumeOptions§options: BTreeMap<String, String>Implementations§
Source§impl VolumeSpec
impl VolumeSpec
Sourcepub fn external(self, external: bool) -> Self
pub fn external(self, external: bool) -> Self
Named volumes: the volume must already exist; isb never creates it.
pub fn read_only(self, ro: bool) -> Self
pub fn owner(self, owner: impl Into<String>) -> Self
pub fn device(self, name: impl Into<String>) -> Self
pub fn pool(self, pool: impl Into<String>) -> Self
Sourcepub fn nocopy(self, nocopy: bool) -> Self
pub fn nocopy(self, nocopy: bool) -> Self
Named volumes: do not seed an empty volume from the image.
pub fn option(self, k: impl Into<String>, v: impl Into<String>) -> Self
Trait Implementations§
Source§impl Clone for VolumeSpec
impl Clone for VolumeSpec
Source§impl Debug for VolumeSpec
impl Debug for VolumeSpec
Source§impl Default for VolumeSpec
impl Default for VolumeSpec
Source§impl<'de> Deserialize<'de> for VolumeSpec
impl<'de> Deserialize<'de> for VolumeSpec
Source§fn deserialize<D: Deserializer<'de>>(d: D) -> Result<Self, D::Error>
fn deserialize<D: Deserializer<'de>>(d: D) -> Result<Self, D::Error>
Deserialize this value from the given Serde deserializer. Read more
Source§impl JsonSchema for VolumeSpec
impl JsonSchema for VolumeSpec
Source§fn json_schema(g: &mut SchemaGenerator) -> Schema
fn json_schema(g: &mut SchemaGenerator) -> Schema
Generates a JSON Schema for this type. Read more
Source§fn inline_schema() -> bool
fn inline_schema() -> bool
Whether JSON Schemas generated for this type should be included directly in parent schemas,
rather than being re-used where possible using the
$ref keyword. Read moreSource§impl PartialEq for VolumeSpec
impl PartialEq for VolumeSpec
Source§impl Serialize for VolumeSpec
impl Serialize for VolumeSpec
impl StructuralPartialEq for VolumeSpec
Auto Trait Implementations§
impl Freeze for VolumeSpec
impl RefUnwindSafe for VolumeSpec
impl Send for VolumeSpec
impl Sync for VolumeSpec
impl Unpin for VolumeSpec
impl UnsafeUnpin for VolumeSpec
impl UnwindSafe for VolumeSpec
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