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.
Trait Implementations§
Source§impl Boxed for FileStorage
impl Boxed for FileStorage
Source§unsafe fn from_raw(
ptr: <FileStorage as OpenCVFromExtern>::ExternReceive,
) -> Self
unsafe fn from_raw( ptr: <FileStorage as OpenCVFromExtern>::ExternReceive, ) -> Self
Wrap the specified raw pointer Read more
Source§fn into_raw(self) -> <FileStorage as OpenCVTypeExternContainer>::ExternSendMut
fn into_raw(self) -> <FileStorage as OpenCVTypeExternContainer>::ExternSendMut
Return the underlying raw pointer while consuming this wrapper. Read more
Source§fn as_raw(&self) -> <FileStorage as OpenCVTypeExternContainer>::ExternSend
fn as_raw(&self) -> <FileStorage as OpenCVTypeExternContainer>::ExternSend
Return the underlying raw pointer. Read more
Source§fn as_raw_mut(
&mut self,
) -> <FileStorage as OpenCVTypeExternContainer>::ExternSendMut
fn as_raw_mut( &mut self, ) -> <FileStorage as OpenCVTypeExternContainer>::ExternSendMut
Return the underlying mutable raw pointer Read more
Source§impl Debug for FileStorage
impl Debug 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(&mut self, name: &str, val: i64) -> Result<()>
fn write(&mut self, name: &str, val: i64) -> 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: &impl MatTraitConst) -> Result<()>
fn write_mat(&mut self, name: &str, val: &impl MatTraitConst) -> 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§fn write_raw(&mut self, fmt: &str, vec: &mut [u8]) -> Result<()>
fn write_raw(&mut self, fmt: &str, vec: &mut [u8]) -> 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 start_write_struct_def(&mut self, name: &str, flags: i32) -> Result<()>
fn start_write_struct_def(&mut self, name: &str, flags: i32) -> 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 Freeze for FileStorage
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
Source§impl<Mat> ModifyInplace for Matwhere
Mat: Boxed,
impl<Mat> ModifyInplace for Matwhere
Mat: Boxed,
Source§unsafe fn modify_inplace<Res>(
&mut self,
f: impl FnOnce(&Mat, &mut Mat) -> Res,
) -> Res
unsafe fn modify_inplace<Res>( &mut self, f: impl FnOnce(&Mat, &mut Mat) -> Res, ) -> Res
Helper function to call OpenCV functions that allow in-place modification of a
Mat
or another similar object. By passing
a mutable reference to the Mat
to this function your closure will get called with the read reference and a write references
to the same Mat
. This is unsafe in a general case as it leads to having non-exclusive mutable access to the internal data,
but it can be useful for some performance sensitive operations. One example of an OpenCV function that allows such in-place
modification is imgproc::threshold
. Read more