pub struct Manager<'a> { /* private fields */ }
Expand description
This manager abstracts the tree representation to provide a comprehensive API over the information wrapped by the resources tree.
Implementations§
§impl Manager<'_>
impl Manager<'_>
pub fn manifest(&self) -> String
pub fn manifest(&self) -> String
Return the manifest as a string. This manifest matches the node associated with
the type: Types::MANIFEST
.
pub fn set_manifest(&mut self, content: &str)
pub fn set_manifest(&mut self, content: &str)
Change or set the manifest. If the manifest node path does not exist, all required nodes are created.
pub fn find_by_type(&self, res_type: Types) -> Option<Node<'_>>
pub fn find_by_type(&self, res_type: Types) -> Option<Node<'_>>
pub fn print_tree(&self) -> String
pub fn print_tree(&self) -> String
Print the current resources a tree in a pretty representation.
│ ├── Directory ID: 0016 (0x0010) type: VERSION
│ │ └── Directory ID: 0001 (0x0001)
│ │ └── Data ID: 1033 (0x0409) [...]
│ │ ├── Hex: c0:03:34:00:00:00:[...]
│ │ └── Str: ..4...V.S._.V.E.R.S.
│ └── Directory ID: 0024 (0x0018) type: MANIFEST
│ └── Directory ID: 0001 (0x0001)
│ └── Data ID: 1033 (0x0409) [...]
│ ├── Hex: 3c:3f:78:6d:6c:20:[...]
│ └── Str: <?xml version="1.0"
pub fn print_tree_with_depth(&self, depth: u32) -> String
pub fn print_tree_with_depth(&self, depth: u32) -> String
Same as Manager::print_tree
but with a maximal depth provided in the
first parameter.
Auto Trait Implementations§
impl<'a> !RefUnwindSafe for Manager<'a>
impl<'a> !Send for Manager<'a>
impl<'a> !Sync for Manager<'a>
impl<'a> Unpin for Manager<'a>
impl<'a> !UnwindSafe for Manager<'a>
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