pub enum CNode {
File {
title: String,
content: String,
},
Directory {
title: String,
content: HashMap<String, CNode>,
},
}
Variants§
Implementations§
Source§impl CNode
impl CNode
pub fn deserialize_from_string(serdata: &String) -> Result<Self, String>
pub fn new_defualt() -> Self
pub fn new_root<R: Into<String>>(rootdirname: R) -> Result<Self, String>
pub fn serialize_to_string(&self) -> Result<String, String>
pub fn clone_title(&self) -> String
pub fn get_title(&self) -> &String
pub fn add_file<P: AsRef<Path>>( &mut self, path: P, content: String, ) -> Result<ConfigCollectorDestRes, String>
pub fn check<P: AsRef<Path>>( &self, path: P, ) -> Result<ConfigCollectorDestRes, String>
pub fn open<P: AsRef<Path>>(&self, path: P) -> Result<String, String>
pub fn print_out_int(&self, path: PathBuf)
pub fn print_out(&self)
Trait Implementations§
Source§impl ConfigCollectorDest for CNode
impl ConfigCollectorDest for CNode
Source§fn insert_file(
&mut self,
path: &Path,
content: String,
) -> Result<ConfigCollectorDestRes, String>
fn insert_file( &mut self, path: &Path, content: String, ) -> Result<ConfigCollectorDestRes, String>
Stores file (path, content) to the virtual file system. Read more
Source§impl<'de> Deserialize<'de> for CNode
impl<'de> Deserialize<'de> for CNode
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
Auto Trait Implementations§
impl Freeze for CNode
impl RefUnwindSafe for CNode
impl Send for CNode
impl Sync for CNode
impl Unpin for CNode
impl UnwindSafe for CNode
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