Struct opencv::core::FileStorage
source · pub struct FileStorage { /* private fields */ }
Expand description
XML/YAML/JSON file storage class that encapsulates all the information necessary for writing or reading data to/from a file.
Implementations§
source§impl FileStorage
impl FileStorage
sourcepub fn default() -> Result<FileStorage>
pub fn default() -> Result<FileStorage>
The constructors.
The full constructor opens the file. Alternatively you can use the default constructor and then call FileStorage::open.
sourcepub fn new(filename: &str, flags: i32, encoding: &str) -> Result<FileStorage>
pub fn new(filename: &str, flags: i32, encoding: &str) -> Result<FileStorage>
The constructors.
The full constructor opens the file. Alternatively you can use the default constructor and then call FileStorage::open.
Overloaded parameters
@copydoc open()
C++ default parameters
- encoding: String()
sourcepub fn get_default_object_name(filename: &str) -> Result<String>
pub fn get_default_object_name(filename: &str) -> Result<String>
Returns the normalized object name for the specified name of a file.
Parameters
- filename: Name of a file
Returns
The normalized object name.
Trait Implementations§
source§impl Boxed for FileStorage
impl Boxed for FileStorage
source§impl Drop for FileStorage
impl Drop for FileStorage
source§impl FileStorageTrait for FileStorage
impl FileStorageTrait for FileStorage
fn as_raw_mut_FileStorage(&mut self) -> *mut c_void
fn set_state(&mut self, val: i32)
fn set_elname(&mut self, val: &str)
source§fn open(&mut self, filename: &str, flags: i32, encoding: &str) -> Result<bool>
fn open(&mut self, filename: &str, flags: i32, encoding: &str) -> Result<bool>
Opens a file. Read more
source§fn release(&mut self) -> Result<()>
fn release(&mut self) -> Result<()>
Closes the file and releases all the memory buffers. Read more
source§fn release_and_get_string(&mut self) -> Result<String>
fn release_and_get_string(&mut self) -> Result<String>
Closes the file and releases all the memory buffers. Read more
source§fn write_i32(&mut self, name: &str, val: i32) -> Result<()>
fn write_i32(&mut self, name: &str, val: i32) -> Result<()>
Simplified writing API to use with bindings. Read more
source§fn write_f64(&mut self, name: &str, val: f64) -> Result<()>
fn write_f64(&mut self, name: &str, val: f64) -> Result<()>
Simplified writing API to use with bindings. Read more
source§fn write_str(&mut self, name: &str, val: &str) -> Result<()>
fn write_str(&mut self, name: &str, val: &str) -> Result<()>
Simplified writing API to use with bindings. Read more
source§fn write_mat(&mut self, name: &str, val: &Mat) -> Result<()>
fn write_mat(&mut self, name: &str, val: &Mat) -> Result<()>
Simplified writing API to use with bindings. Read more
source§fn write_str_vec(&mut self, name: &str, val: &Vector<String>) -> Result<()>
fn write_str_vec(&mut self, name: &str, val: &Vector<String>) -> Result<()>
Simplified writing API to use with bindings. Read more
source§unsafe fn write_raw(
&mut self,
fmt: &str,
vec: *const c_void,
len: size_t
) -> Result<()>
unsafe fn write_raw( &mut self, fmt: &str, vec: *const c_void, len: size_t ) -> Result<()>
Writes multiple numbers. Read more
source§fn write_comment(&mut self, comment: &str, append: bool) -> Result<()>
fn write_comment(&mut self, comment: &str, append: bool) -> Result<()>
Writes a comment. Read more
source§fn start_write_struct(
&mut self,
name: &str,
flags: i32,
type_name: &str
) -> Result<()>
fn start_write_struct( &mut self, name: &str, flags: i32, type_name: &str ) -> Result<()>
Starts to write a nested structure (sequence or a mapping). Read more
source§fn end_write_struct(&mut self) -> Result<()>
fn end_write_struct(&mut self) -> Result<()>
Finishes writing nested structure (should pair startWriteStruct())
source§impl FileStorageTraitConst for FileStorage
impl FileStorageTraitConst for FileStorage
fn as_raw_FileStorage(&self) -> *const c_void
fn state(&self) -> i32
fn elname(&self) -> String
source§fn 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. Read more
source§fn get(&self, nodename: &str) -> Result<FileNode>
fn get(&self, nodename: &str) -> Result<FileNode>
Returns the specified element of the top-level mapping. Read more
impl Send for FileStorage
Auto Trait Implementations§
impl RefUnwindSafe for FileStorage
impl !Sync for FileStorage
impl Unpin for FileStorage
impl UnwindSafe for FileStorage
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