pub struct KconfigFile { /* private fields */ }Expand description
Represents a Kconfig file.
It stores the kernel root directory because we need this information when a source keyword is met.
Implementations§
Source§impl KconfigFile
impl KconfigFile
pub fn new(root_dir: PathBuf, file: PathBuf) -> Self
pub fn new_with_vars<S: AsRef<str>>( root_dir: PathBuf, file: PathBuf, vars: &HashMap<S, S>, ) -> Self
pub fn full_path(&self) -> PathBuf
pub fn read_to_string(&self) -> Result<String>
pub fn set_vars<S: AsRef<str>>(&mut self, vars: &[(S, S)])
Trait Implementations§
Source§impl Clone for KconfigFile
impl Clone for KconfigFile
Source§fn clone(&self) -> KconfigFile
fn clone(&self) -> KconfigFile
Returns a duplicate of the value. Read more
1.0.0 · 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 KconfigFile
impl Debug for KconfigFile
Source§impl Default for KconfigFile
impl Default for KconfigFile
Source§fn default() -> KconfigFile
fn default() -> KconfigFile
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for KconfigFile
impl RefUnwindSafe for KconfigFile
impl Send for KconfigFile
impl Sync for KconfigFile
impl Unpin for KconfigFile
impl UnwindSafe for KconfigFile
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