pub trait BufferTraitConst {
Show 16 methods
// Required method
fn as_raw_Buffer(&self) -> *const c_void;
// Provided methods
fn copy_to(&self, arr: &mut impl ToOutputArray) -> Result<()> { ... }
fn copy_to_1(
&self,
arr: &mut impl ToOutputArray,
stream: &mut impl StreamTrait,
) -> Result<()> { ... }
fn clone(&self, target: Buffer_Target, auto_release: bool) -> Result<Buffer> { ... }
fn clone_def(&self) -> Result<Buffer> { ... }
fn bind(&self, target: Buffer_Target) -> Result<()> { ... }
fn rows(&self) -> Result<i32> { ... }
fn cols(&self) -> Result<i32> { ... }
fn size(&self) -> Result<Size> { ... }
fn empty(&self) -> Result<bool> { ... }
fn typ(&self) -> Result<i32> { ... }
fn depth(&self) -> Result<i32> { ... }
fn channels(&self) -> Result<i32> { ... }
fn elem_size(&self) -> Result<i32> { ... }
fn elem_size1(&self) -> Result<i32> { ... }
fn buf_id(&self) -> Result<u32> { ... }
}
Expand description
Constant methods for core::Buffer
Required Methods§
fn as_raw_Buffer(&self) -> *const c_void
Provided Methods§
Sourcefn copy_to(&self, arr: &mut impl ToOutputArray) -> Result<()>
fn copy_to(&self, arr: &mut impl ToOutputArray) -> Result<()>
Copies from OpenGL buffer to host/device memory or another OpenGL buffer object.
§Parameters
- arr: Destination array (host or device memory, can be Mat , cuda::GpuMat , std::vector or ogl::Buffer ).
Sourcefn copy_to_1(
&self,
arr: &mut impl ToOutputArray,
stream: &mut impl StreamTrait,
) -> Result<()>
fn copy_to_1( &self, arr: &mut impl ToOutputArray, stream: &mut impl StreamTrait, ) -> Result<()>
Sourcefn clone_def(&self) -> Result<Buffer>
fn clone_def(&self) -> Result<Buffer>
Creates a full copy of the buffer object and the underlying data.
§Parameters
- target: Buffer usage for destination buffer.
- autoRelease: Auto release mode for destination buffer.
§Note
This alternative version of BufferTraitConst::clone function uses the following default values for its arguments:
- target: ARRAY_BUFFER
- auto_release: false
Sourcefn bind(&self, target: Buffer_Target) -> Result<()>
fn bind(&self, target: Buffer_Target) -> Result<()>
Binds OpenGL buffer to the specified buffer binding point.
§Parameters
- target: Binding point. See cv::ogl::Buffer::Target .
fn rows(&self) -> Result<i32>
fn cols(&self) -> Result<i32>
fn size(&self) -> Result<Size>
fn empty(&self) -> Result<bool>
fn typ(&self) -> Result<i32>
fn depth(&self) -> Result<i32>
fn channels(&self) -> Result<i32>
fn elem_size(&self) -> Result<i32>
fn elem_size1(&self) -> Result<i32>
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.