pub struct Decoded {
pub info: BlobInfo,
pub pixels: PixelData,
pub mask: Option<Vec<u8>>,
}Expand description
Native-typed pixels, validated metadata, and an optional validity mask for one blob.
Fields§
§info: BlobInfoValidated blob metadata.
pixels: PixelDataPixel-interleaved samples in the blob’s native numeric type.
mask: Option<Vec<u8>>Row-major validity bytes, when the blob has a mask.
Implementations§
Source§impl Decoded
impl Decoded
Sourcepub fn to_ndarray<T: NdArrayElement>(&self) -> Result<ArrayD<T>>
pub fn to_ndarray<T: NdArrayElement>(&self) -> Result<ArrayD<T>>
Borrows this result and copies its pixels into an ndarray.
§Errors
Returns an error if T differs from the native type or the shape is invalid.
Sourcepub fn into_ndarray<T: NdArrayElement>(self) -> Result<ArrayD<T>>
pub fn into_ndarray<T: NdArrayElement>(self) -> Result<ArrayD<T>>
Consumes this result and moves its pixels into an ndarray.
§Errors
Returns an error if T differs from the native type or the shape is invalid.
Trait Implementations§
impl StructuralPartialEq for Decoded
Auto Trait Implementations§
impl Freeze for Decoded
impl RefUnwindSafe for Decoded
impl Send for Decoded
impl Sync for Decoded
impl Unpin for Decoded
impl UnsafeUnpin for Decoded
impl UnwindSafe for Decoded
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