pub trait FileStorageTraitConst {
// Required method
fn as_raw_FileStorage(&self) -> *const c_void;
// Provided methods
fn state(&self) -> i32 { ... }
fn elname(&self) -> String { ... }
fn is_opened(&self) -> Result<bool> { ... }
fn get_first_top_level_node(&self) -> Result<FileNode> { ... }
fn root(&self, streamidx: i32) -> Result<FileNode> { ... }
fn root_def(&self) -> Result<FileNode> { ... }
fn get(&self, nodename: &str) -> Result<FileNode> { ... }
fn get_node(&self, nodename: &str) -> Result<FileNode> { ... }
fn get_format(&self) -> Result<i32> { ... }
}
Expand description
Constant methods for core::FileStorage
Required Methods§
fn as_raw_FileStorage(&self) -> *const c_void
Provided Methods§
fn state(&self) -> i32
fn elname(&self) -> String
Sourcefn is_opened(&self) -> Result<bool>
fn is_opened(&self) -> Result<bool>
Checks whether the file is opened.
§Returns
true if the object is associated with the current file and false otherwise. It is a good practice to call this method after you tried to open a file.
Sourcefn get_first_top_level_node(&self) -> Result<FileNode>
fn get_first_top_level_node(&self) -> Result<FileNode>
Returns the first element of the top-level mapping.
§Returns
The first element of the top-level mapping.
Sourcefn root_def(&self) -> Result<FileNode>
fn root_def(&self) -> Result<FileNode>
Returns the top-level mapping
§Parameters
- streamidx: Zero-based index of the stream. In most cases there is only one stream in the file. However, YAML supports multiple streams and so there can be several.
§Returns
The top-level mapping.
§Note
This alternative version of FileStorageTraitConst::root function uses the following default values for its arguments:
- streamidx: 0