pub enum IdmapSpec {
Mode(IdmapMode),
Map(IdmapMap),
Raw(IdmapRaw),
}Expand description
idmap handling.
The usual need is “host uid/gid 1000 must be the guest’s uid/gid 1000 so a
bind-mounted checkout is writable”. Whether that needs raw.idmap depends on
the host: when root’s subordinate id range (in /etc/subuid, /etc/subgid)
already contains the host id, the default map covers it and asking for
raw.idmap is refused by incus (“Host ID is in the range of subids”); when
it does not (a separate root:1000:1 delegation only permits the mapping),
raw.idmap is required.
Forms:
auto: map 1000:1000 ↔ 1000:1000 only where needed (per id, uid and gid checked separately).none: never setraw.idmap.always: always set it for 1000 ↔ 1000.{mode: auto|always, host_uid, host_gid, guest_uid, guest_gid}: other ids.{raw: "both 1000 1000"}: an explicitraw.idmapvalue.
Variants§
Trait Implementations§
Source§impl<'de> Deserialize<'de> for IdmapSpec
impl<'de> Deserialize<'de> for IdmapSpec
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 JsonSchema for IdmapSpec
impl JsonSchema for IdmapSpec
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Returns a string that uniquely identifies the schema produced by this type. Read more
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &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 moreimpl StructuralPartialEq for IdmapSpec
Auto Trait Implementations§
impl Freeze for IdmapSpec
impl RefUnwindSafe for IdmapSpec
impl Send for IdmapSpec
impl Sync for IdmapSpec
impl Unpin for IdmapSpec
impl UnsafeUnpin for IdmapSpec
impl UnwindSafe for IdmapSpec
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