#[non_exhaustive]pub struct LayerContext {
pub device: String,
pub state_dir: Option<PathBuf>,
}Expand description
What a layer is told about its place at construction: the device it serves, and where it may keep state it must not lose (#158’s counters), if the host gave the driver one.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.device: StringThe device’s name, the {device} chunk of every key about it.
state_dir: Option<PathBuf>A directory of this layer’s own, under the daemon’s state directory,
or None when the host has none. A layer that needs one and is given
none refuses to be built, naming the setting.
Implementations§
Trait Implementations§
Source§impl Clone for LayerContext
impl Clone for LayerContext
Source§impl Debug for LayerContext
impl Debug for LayerContext
impl Eq for LayerContext
Source§impl PartialEq for LayerContext
impl PartialEq for LayerContext
impl StructuralPartialEq for LayerContext
Auto Trait Implementations§
impl Freeze for LayerContext
impl RefUnwindSafe for LayerContext
impl Send for LayerContext
impl Sync for LayerContext
impl Unpin for LayerContext
impl UnsafeUnpin for LayerContext
impl UnwindSafe for LayerContext
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