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
sourceimpl 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
sourceimpl Boxed for FileStorage
impl Boxed for FileStorage
sourceimpl Drop for FileStorage
impl Drop for FileStorage
sourceimpl 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)
sourcefn 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
sourcefn release(&mut self) -> Result<()>
fn release(&mut self) -> Result<()>
Closes the file and releases all the memory buffers. Read more
sourcefn 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
sourcefn 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
sourcefn 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
sourcefn 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
sourcefn 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
sourcefn 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
sourceunsafe 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
sourcefn write_comment(&mut self, comment: &str, append: bool) -> Result<()>
fn write_comment(&mut self, comment: &str, append: bool) -> Result<()>
Writes a comment. Read more
sourcefn 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
sourcefn end_write_struct(&mut self) -> Result<()>
fn end_write_struct(&mut self) -> Result<()>
Finishes writing nested structure (should pair startWriteStruct())
sourceimpl FileStorageTraitConst for FileStorage
impl FileStorageTraitConst for FileStorage
fn as_raw_FileStorage(&self) -> *const c_void
fn state(&self) -> i32
fn elname(&self) -> String
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. Read more
sourcefn get(&self, nodename: &str) -> Result<FileNode>
fn get(&self, nodename: &str) -> Result<FileNode>
Returns the specified element of the top-level mapping. Read more
sourcefn get_node(&self, nodename: &str) -> Result<FileNode>
fn get_node(&self, nodename: &str) -> Result<FileNode>
Returns the specified element of the top-level mapping. Read more
sourcefn get_format(&self) -> Result<i32>
fn get_format(&self) -> Result<i32>
Returns the current format. 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
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more