opencv::prelude

Trait FileNodeTraitConst

Source
pub trait FileNodeTraitConst {
Show 31 methods // Required method fn as_raw_FileNode(&self) -> *const c_void; // Provided methods fn block_idx(&self) -> size_t { ... } fn ofs(&self) -> size_t { ... } fn get(&self, nodename: &str) -> Result<FileNode> { ... } fn get_node(&self, nodename: &str) -> Result<FileNode> { ... } fn at(&self, i: i32) -> Result<FileNode> { ... } fn keys(&self) -> Result<Vector<String>> { ... } fn typ(&self) -> Result<i32> { ... } fn empty(&self) -> Result<bool> { ... } fn is_none(&self) -> Result<bool> { ... } fn is_seq(&self) -> Result<bool> { ... } fn is_map(&self) -> Result<bool> { ... } fn is_int(&self) -> Result<bool> { ... } fn is_real(&self) -> Result<bool> { ... } fn is_string(&self) -> Result<bool> { ... } fn is_named(&self) -> Result<bool> { ... } fn name(&self) -> Result<String> { ... } fn size(&self) -> Result<size_t> { ... } fn raw_size(&self) -> Result<size_t> { ... } fn to_i32(&self) -> Result<i32> { ... } fn to_i64(&self) -> Result<i64> { ... } fn to_f32(&self) -> Result<f32> { ... } fn to_f64(&self) -> Result<f64> { ... } fn to_string(&self) -> Result<String> { ... } fn ptr(&self) -> Result<*const u8> { ... } fn begin(&self) -> Result<FileNodeIterator> { ... } fn end(&self) -> Result<FileNodeIterator> { ... } fn read_raw(&self, fmt: &str, vec: &mut [u8]) -> Result<()> { ... } fn real(&self) -> Result<f64> { ... } fn string(&self) -> Result<String> { ... } fn mat(&self) -> Result<Mat> { ... }
}
Expand description

Constant methods for core::FileNode

Required Methods§

Provided Methods§

Source

fn block_idx(&self) -> size_t

Source

fn ofs(&self) -> size_t

Source

fn get(&self, nodename: &str) -> Result<FileNode>

Returns element of a mapping node or a sequence node.

§Parameters
  • nodename: Name of an element in the mapping node.
§Returns

Returns the element with the given identifier.

Source

fn get_node(&self, nodename: &str) -> Result<FileNode>

Returns element of a mapping node or a sequence node.

§Parameters
  • nodename: Name of an element in the mapping node.
§Returns

Returns the element with the given identifier.

§Overloaded parameters
  • nodename: Name of an element in the mapping node.
Source

fn at(&self, i: i32) -> Result<FileNode>

Returns element of a mapping node or a sequence node.

§Parameters
  • nodename: Name of an element in the mapping node.
§Returns

Returns the element with the given identifier.

§Overloaded parameters
  • i: Index of an element in the sequence node.
Source

fn keys(&self) -> Result<Vector<String>>

Returns keys of a mapping node.

§Returns

Keys of a mapping node.

Source

fn typ(&self) -> Result<i32>

Returns type of the node.

§Returns

Type of the node. See FileNode::Type

Source

fn empty(&self) -> Result<bool>

returns true if the node is empty

Source

fn is_none(&self) -> Result<bool>

returns true if the node is a “none” object

Source

fn is_seq(&self) -> Result<bool>

returns true if the node is a sequence

Source

fn is_map(&self) -> Result<bool>

returns true if the node is a mapping

Source

fn is_int(&self) -> Result<bool>

returns true if the node is an integer

Source

fn is_real(&self) -> Result<bool>

returns true if the node is a floating-point number

Source

fn is_string(&self) -> Result<bool>

returns true if the node is a text string

Source

fn is_named(&self) -> Result<bool>

returns true if the node has a name

Source

fn name(&self) -> Result<String>

returns the node name or an empty string if the node is nameless

Source

fn size(&self) -> Result<size_t>

returns the number of elements in the node, if it is a sequence or mapping, or 1 otherwise.

Source

fn raw_size(&self) -> Result<size_t>

returns raw size of the FileNode in bytes

Source

fn to_i32(&self) -> Result<i32>

returns the node content as an integer. If the node stores floating-point number, it is rounded.

Source

fn to_i64(&self) -> Result<i64>

returns the node content as a signed 64bit integer. If the node stores floating-point number, it is rounded.

Source

fn to_f32(&self) -> Result<f32>

returns the node content as float

Source

fn to_f64(&self) -> Result<f64>

returns the node content as double

Source

fn to_string(&self) -> Result<String>

returns the node content as text string

Source

fn ptr(&self) -> Result<*const u8>

Source

fn begin(&self) -> Result<FileNodeIterator>

returns iterator pointing to the first node element

Source

fn end(&self) -> Result<FileNodeIterator>

returns iterator pointing to the element following the last node element

Source

fn read_raw(&self, fmt: &str, vec: &mut [u8]) -> Result<()>

Reads node elements to the buffer with the specified format.

Usually it is more convenient to use operator >> instead of this method.

§Parameters
  • fmt: Specification of each array element. See [format_spec] “format specification”
  • vec: Pointer to the destination array.
  • len: Number of bytes to read (buffer size limit). If it is greater than number of remaining elements then all of them will be read.
Source

fn real(&self) -> Result<f64>

Simplified reading API to use with bindings.

Source

fn string(&self) -> Result<String>

Simplified reading API to use with bindings.

Source

fn mat(&self) -> Result<Mat>

Simplified reading API to use with bindings.

Implementors§