#[repr(u8)]pub enum RasterDataType {
UInt8 = 1,
Int8 = 2,
UInt16 = 3,
Int16 = 4,
UInt32 = 5,
Int32 = 6,
UInt64 = 7,
Int64 = 8,
Float32 = 9,
Float64 = 10,
CFloat32 = 11,
CFloat64 = 12,
}Expand description
Raster data types representing pixel values
Variants§
UInt8 = 1
Unsigned 8-bit integer (0-255)
Int8 = 2
Signed 8-bit integer (-128 to 127)
UInt16 = 3
Unsigned 16-bit integer (0-65535)
Int16 = 4
Signed 16-bit integer
UInt32 = 5
Unsigned 32-bit integer
Int32 = 6
Signed 32-bit integer
UInt64 = 7
Unsigned 64-bit integer
Int64 = 8
Signed 64-bit integer
Float32 = 9
32-bit floating point
Float64 = 10
64-bit floating point
CFloat32 = 11
Complex 32-bit floating point (real + imaginary)
CFloat64 = 12
Complex 64-bit floating point (real + imaginary)
Implementations§
Source§impl RasterDataType
impl RasterDataType
Sourcepub const fn size_bytes(self) -> usize
pub const fn size_bytes(self) -> usize
Returns the size in bytes of this data type
Sourcepub const fn is_floating_point(self) -> bool
pub const fn is_floating_point(self) -> bool
Returns true if this is a floating-point type
Sourcepub const fn is_complex(self) -> bool
pub const fn is_complex(self) -> bool
Returns true if this is a complex type
Sourcepub const fn is_integer(self) -> bool
pub const fn is_integer(self) -> bool
Returns true if this is an integer type
Sourcepub const fn from_tiff_sample_format(
sample_format: u16,
bits_per_sample: u16,
) -> Option<RasterDataType>
pub const fn from_tiff_sample_format( sample_format: u16, bits_per_sample: u16, ) -> Option<RasterDataType>
Sourcepub const fn to_tiff_sample_format(self) -> (u16, u16)
pub const fn to_tiff_sample_format(self) -> (u16, u16)
Trait Implementations§
Source§impl Clone for RasterDataType
impl Clone for RasterDataType
Source§fn clone(&self) -> RasterDataType
fn clone(&self) -> RasterDataType
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for RasterDataType
impl Debug for RasterDataType
Source§impl Default for RasterDataType
impl Default for RasterDataType
Source§fn default() -> RasterDataType
fn default() -> RasterDataType
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for RasterDataType
impl<'de> Deserialize<'de> for RasterDataType
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<RasterDataType, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<RasterDataType, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Display for RasterDataType
impl Display for RasterDataType
Source§impl Hash for RasterDataType
impl Hash for RasterDataType
Source§impl PartialEq for RasterDataType
impl PartialEq for RasterDataType
Source§impl Serialize for RasterDataType
impl Serialize for RasterDataType
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
impl Copy for RasterDataType
impl Eq for RasterDataType
impl StructuralPartialEq for RasterDataType
Auto Trait Implementations§
impl Freeze for RasterDataType
impl RefUnwindSafe for RasterDataType
impl Send for RasterDataType
impl Sync for RasterDataType
impl Unpin for RasterDataType
impl UnsafeUnpin for RasterDataType
impl UnwindSafe for RasterDataType
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