efivar_fix/writer.rs
1use super::efi::{Variable, VariableFlags};
2
3/// Represents the capability of writing EFI variables
4pub trait VarWriter {
5 /// Write the new value of the given EFI variable
6 ///
7 /// Note that some implementations will ignore attribute changes.
8 ///
9 /// # Arguments
10 ///
11 /// * `var`: the variable to write
12 /// * `attributes`: EFI variable attributes
13 /// * `value`: EFI variable contents
14 fn write(
15 &mut self,
16 var: &Variable,
17 attributes: VariableFlags,
18 value: &[u8],
19 ) -> crate::Result<()>;
20
21 fn delete(&mut self, var: &Variable) -> crate::Result<()>;
22}