pub struct GrabResult { /* private fields */ }Expand description
Reusable container for a single grab result.
Implementations§
Source§impl GrabResult
impl GrabResult
Sourcepub fn new() -> PylonResult<Self>
pub fn new() -> PylonResult<Self>
Allocates an empty grab result.
Sourcepub fn grab_succeeded(&self) -> PylonResult<bool>
pub fn grab_succeeded(&self) -> PylonResult<bool>
Returns whether the grab completed successfully.
Sourcepub fn error_description(&self) -> PylonResult<String>
pub fn error_description(&self) -> PylonResult<String>
Returns the failure message for an unsuccessful grab.
Sourcepub fn error_code(&self) -> PylonResult<u32>
pub fn error_code(&self) -> PylonResult<u32>
Returns the camera-specific error code for an unsuccessful grab.
Sourcepub fn width(&self) -> PylonResult<u32>
pub fn width(&self) -> PylonResult<u32>
Returns the image width in pixels.
Sourcepub fn height(&self) -> PylonResult<u32>
pub fn height(&self) -> PylonResult<u32>
Returns the image height in pixels.
Sourcepub fn offset_x(&self) -> PylonResult<u32>
pub fn offset_x(&self) -> PylonResult<u32>
Returns the horizontal image offset.
Sourcepub fn offset_y(&self) -> PylonResult<u32>
pub fn offset_y(&self) -> PylonResult<u32>
Returns the vertical image offset.
Sourcepub fn padding_x(&self) -> PylonResult<u32>
pub fn padding_x(&self) -> PylonResult<u32>
Returns the horizontal padding in bytes.
Sourcepub fn padding_y(&self) -> PylonResult<u32>
pub fn padding_y(&self) -> PylonResult<u32>
Returns the vertical padding in bytes.
Sourcepub fn buffer(&self) -> PylonResult<&[u8]>
pub fn buffer(&self) -> PylonResult<&[u8]>
Returns the image buffer.
Sourcepub fn payload_size(&self) -> PylonResult<u32>
pub fn payload_size(&self) -> PylonResult<u32>
Returns the payload size in bytes.
Sourcepub fn buffer_size(&self) -> PylonResult<u32>
pub fn buffer_size(&self) -> PylonResult<u32>
Returns the backing buffer capacity in bytes.
Sourcepub fn block_id(&self) -> PylonResult<u64>
pub fn block_id(&self) -> PylonResult<u64>
Returns the block identifier.
Sourcepub fn time_stamp(&self) -> PylonResult<u64>
pub fn time_stamp(&self) -> PylonResult<u64>
Returns the camera timestamp.
Sourcepub fn stride(&self) -> PylonResult<usize>
pub fn stride(&self) -> PylonResult<usize>
Returns the image stride in bytes.
Sourcepub fn image_size(&self) -> PylonResult<u32>
pub fn image_size(&self) -> PylonResult<u32>
Returns the image size in bytes.
Sourcepub fn chunk_data_node_map(&self) -> PylonResult<NodeMap<'_>>
pub fn chunk_data_node_map(&self) -> PylonResult<NodeMap<'_>>
Returns the chunk-data node map for this result.
Trait Implementations§
Source§impl Drop for GrabResult
impl Drop for GrabResult
impl Send for GrabResult
Auto Trait Implementations§
impl Freeze for GrabResult
impl RefUnwindSafe for GrabResult
impl !Sync for GrabResult
impl Unpin for GrabResult
impl UnsafeUnpin for GrabResult
impl UnwindSafe for GrabResult
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