Struct cameraunit::SerialImageBuffer

source ·
pub struct SerialImageBuffer<T>
where T: Primitive,
{ /* private fields */ }
Expand description

A serializable image data container for u8, u16 and f32 pixel types.

Image data is organized in channels. For example, a grayscale image stores data in the luma channel, while a color image stores data in the red, green and blue channels. Transparency is stored in the alpha channel.

Implementations§

source§

impl<T> SerialImageBuffer<T>
where T: Primitive,

source

pub fn from_vec( width: usize, height: usize, data: Vec<T> ) -> Result<SerialImageBuffer<T>, &'static str>

Create a new serializable image buffer from vector data.

§Arguments
  • width: Image width.
  • height: Image height.
  • data: Image data.

Note:

  • If width * height == data.len(), the image is assumed to be a grayscale image.
  • If width * height * 2 == data.len(), the image is assumed to be a grayscale image with alpha channel, with the odd pixels being the luma channel and the even pixels being the alpha channel.
  • If width * height * 3 == data.len(), the image is assumed to be a color image, with the first pixel in the red channel, the second pixel in the green channel, and the third pixel in the blue channel and so on.
  • If width * height * 4 == data.len(), the image is assumed to be a color image with alpha channel, with the first pixel in the red channel, the second pixel in the green channel, the third pixel in the blue channel and the fourth pixel in the alpha channel and so on.
§Errors
  • If width * height == 0.
  • If number of pixel elements is not in [1..=4].
  • If the length of the channel data stored in the image is not equal to width * height * pixel elements. Number of pixel elements are inferred using the length of the data vector.
source

pub fn get_metadata(&self) -> Option<ImageMetaData>

Get the image metadata.

source

pub fn set_metadata(&mut self, meta: Option<ImageMetaData>)

Update the image metadata.

§Arguments
  • meta: Image metadata.
source

pub fn get_luma(&self) -> Option<&Vec<T>>

Get the luminosity channel data.

source

pub fn get_mut_luma(&mut self) -> Option<&mut Vec<T>>

Get a mutable reference to the luminosity channel data.

source

pub fn get_red(&self) -> Option<&Vec<T>>

Get the red channel data.

source

pub fn get_mut_red(&mut self) -> Option<&mut Vec<T>>

Get a mutable reference to the red channel data.

source

pub fn get_green(&self) -> Option<&Vec<T>>

Get the green channel data.

source

pub fn get_mut_green(&mut self) -> Option<&mut Vec<T>>

Get a mutable reference to the green channel data.

source

pub fn get_blue(&self) -> Option<&Vec<T>>

Get the blue channel data.

source

pub fn get_mut_blue(&mut self) -> Option<&mut Vec<T>>

Get a mutable reference to the blue channel data.

source

pub fn get_alpha(&self) -> Option<&Vec<T>>

Get the alpha channel data.

source

pub fn get_mut_alpha(&mut self) -> Option<&mut Vec<T>>

Get a mutable reference to the alpha channel data.

source

pub fn width(&self) -> usize

Get image width.

source

pub fn height(&self) -> usize

Get image height.

source

pub fn pixel_elems(&self) -> u8

Get the number of pixel elements.

source

pub fn is_luma(&self) -> bool

Check if the image is grayscale.

source

pub fn is_rgb(&self) -> bool

Check if the image is RGB.

source

pub fn into_vec(self) -> Vec<T>

Consume the image buffer and return a contiguous vector.

Note:

  • If the image is grayscale, the vector contains the luma channel data.
  • If the image is grayscale with alpha channel, odd pixels are luminoisty and even pixels are alpha.
  • If the image is RGB, the first element of the vector is red, the second element is green and the third element is blue and so on.
  • If the image is RGB with alpha channel, the first element of the vector is red, the second element is green, the third element is blue and the fourth element is alpha and so on.
source§

impl SerialImageBuffer<u8>

source

pub fn new( meta: Option<ImageMetaData>, luma: Option<Vec<u8>>, red: Option<Vec<u8>>, green: Option<Vec<u8>>, blue: Option<Vec<u8>>, alpha: Option<Vec<u8>>, width: usize, height: usize ) -> Result<SerialImageBuffer<u8>, &'static str>

Create a new serializable image buffer.

§Arguments
  • meta: Image metadata (optional).
  • luma: Luminosity data for a grayscale image. Set to None if it is a color image.
  • red: Red channel data. Set to None if it is a grayscale image.
  • green: Green channel data. Set to None if it is a grayscale image.
  • blue: Blue channel data. Set to None if it is a grayscale image.
  • alpha: Alpha channel data (optional).
§Errors
  • If width * height == 0.
  • If all color channels are not specified.
  • If luma and color channels are specified at the same time.
  • If the length of the channel data stored in the image is not equal to width * height.
source

pub fn into_luma(&self) -> SerialImageBuffer<u16>

Convert the image to grayscale, while discarding the alpha channel. The transformation used is 0.2162 * red + 0.7152 * green + 0.0722 * blue for converting RGB to grayscale (see here).

source

pub fn into_luma_alpha(&self) -> SerialImageBuffer<u16>

Convert the image to grayscale, while preserving the alpha channel. The transformation used is 0.2162 * red + 0.7152 * green + 0.0722 * blue for converting RGB to grayscale (see here).

source

pub fn resize( self, nwidth: usize, nheight: usize, filter: FilterType ) -> SerialImageBuffer<u8>

Resize this image using the specified filter algorithm. Returns a new image. The image’s aspect ratio is preserved. The image is scaled to the maximum possible size that fits within the bounds specified by nwidth and nheight.

source

pub fn savefits( &self, dir_prefix: &Path, file_prefix: &str, progname: Option<&str>, compress: bool, overwrite: bool ) -> Result<PathBuf, Error>

Save the image data to a FITS file.

§Arguments
  • dir_prefix - The directory where the file will be saved.
  • file_prefix - The prefix of the file name. The file name will be of the form {file_prefix}_{timestamp}.fits.
  • progname - The name of the program that generated the image.
  • compress - Whether to compress the FITS file.
  • overwrite - Whether to overwrite the file if it already exists.
§Errors
source§

impl SerialImageBuffer<u16>

source

pub fn new( meta: Option<ImageMetaData>, luma: Option<Vec<u16>>, red: Option<Vec<u16>>, green: Option<Vec<u16>>, blue: Option<Vec<u16>>, alpha: Option<Vec<u16>>, width: usize, height: usize ) -> Result<SerialImageBuffer<u16>, &'static str>

Create a new serializable image buffer.

§Arguments
  • meta: Image metadata (optional).
  • luma: Luminosity data for a grayscale image. Set to None if it is a color image.
  • red: Red channel data. Set to None if it is a grayscale image.
  • green: Green channel data. Set to None if it is a grayscale image.
  • blue: Blue channel data. Set to None if it is a grayscale image.
  • alpha: Alpha channel data (optional).
§Errors
  • If width * height == 0.
  • If all color channels are not specified.
  • If luma and color channels are specified at the same time.
  • If the length of the channel data stored in the image is not equal to width * height.
source

pub fn into_luma(&self) -> SerialImageBuffer<u16>

Convert the image to grayscale, while discarding the alpha channel. The transformation used is 0.2162 * red + 0.7152 * green + 0.0722 * blue for converting RGB to grayscale (see here).

source

pub fn into_luma_alpha(&self) -> SerialImageBuffer<u16>

Convert the image to grayscale, while preserving the alpha channel. The transformation used is 0.2162 * red + 0.7152 * green + 0.0722 * blue for converting RGB to grayscale (see here).

source

pub fn resize( self, nwidth: usize, nheight: usize, filter: FilterType ) -> SerialImageBuffer<u16>

Resize this image using the specified filter algorithm. Returns a new image. The image’s aspect ratio is preserved. The image is scaled to the maximum possible size that fits within the bounds specified by nwidth and nheight.

source

pub fn savefits( &self, dir_prefix: &Path, file_prefix: &str, progname: Option<&str>, compress: bool, overwrite: bool ) -> Result<PathBuf, Error>

Save the image data to a FITS file.

§Arguments
  • dir_prefix - The directory where the file will be saved.
  • file_prefix - The prefix of the file name. The file name will be of the form {file_prefix}_{timestamp}.fits.
  • progname - The name of the program that generated the image.
  • compress - Whether to compress the FITS file.
  • overwrite - Whether to overwrite the file if it already exists.
§Errors
source§

impl SerialImageBuffer<f32>

source

pub fn new( meta: Option<ImageMetaData>, red: Vec<f32>, green: Vec<f32>, blue: Vec<f32>, alpha: Option<Vec<f32>>, width: usize, height: usize ) -> Result<SerialImageBuffer<f32>, &'static str>

Create a new serializable image buffer.

§Arguments
  • meta: Image metadata (optional).
  • red: Red channel data. Set to None if it is a grayscale image.
  • green: Green channel data. Set to None if it is a grayscale image.
  • blue: Blue channel data. Set to None if it is a grayscale image.
  • alpha: Alpha channel data (optional).
§Errors
  • If width * height == 0.
  • If the length of the channel data stored in the image is not equal to width * height.
source

pub fn into_luma(&self) -> SerialImageBuffer<u16>

Convert the image to grayscale, discarding the alpha channel. The transformation used is 0.2162 * red + 0.7152 * green + 0.0722 * blue for converting RGB to grayscale (see here).

source

pub fn into_luma_alpha(&self) -> SerialImageBuffer<u16>

Convert the image to grayscale, while preserving the alpha channel. The transformation used is 0.2162 * red + 0.7152 * green + 0.0722 * blue for converting RGB to grayscale (see here).

source

pub fn resize( self, nwidth: usize, nheight: usize, filter: FilterType ) -> SerialImageBuffer<f32>

Resize this image using the specified filter algorithm. Returns a new image. The image’s aspect ratio is preserved. The image is scaled to the maximum possible size that fits within the bounds specified by nwidth and nheight.

source

pub fn savefits( &self, dir_prefix: &Path, file_prefix: &str, progname: Option<&str>, compress: bool, overwrite: bool ) -> Result<PathBuf, Error>

Save the image data to a FITS file.

§Arguments
  • dir_prefix - The directory where the file will be saved.
  • file_prefix - The prefix of the file name. The file name will be of the form {file_prefix}_{timestamp}.fits.
  • progname - The name of the program that generated the image.
  • compress - Whether to compress the FITS file.
  • overwrite - Whether to overwrite the file if it already exists.
§Errors

Trait Implementations§

source§

impl<T> Clone for SerialImageBuffer<T>
where T: Clone + Primitive,

source§

fn clone(&self) -> SerialImageBuffer<T>

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl<T> Debug for SerialImageBuffer<T>
where T: Debug + Primitive,

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
source§

impl<'de, T> Deserialize<'de> for SerialImageBuffer<T>
where T: Primitive + Deserialize<'de>,

source§

fn deserialize<__D>( __deserializer: __D ) -> Result<SerialImageBuffer<T>, <__D as Deserializer<'de>>::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
source§

impl<T> From<&ImageBuffer<Luma<T>, Vec<T>>> for SerialImageBuffer<T>
where T: Primitive,

source§

fn from(img: &ImageBuffer<Luma<T>, Vec<T>>) -> SerialImageBuffer<T>

Converts to this type from the input type.
source§

impl<T> From<&ImageBuffer<LumaA<T>, Vec<T>>> for SerialImageBuffer<T>
where T: Primitive,

source§

fn from(img: &ImageBuffer<LumaA<T>, Vec<T>>) -> SerialImageBuffer<T>

Converts to this type from the input type.
source§

impl From<&ImageBuffer<Rgb<f32>, Vec<f32>>> for SerialImageBuffer<f32>

source§

fn from(img: &ImageBuffer<Rgb<f32>, Vec<f32>>) -> SerialImageBuffer<f32>

Converts to this type from the input type.
source§

impl From<&ImageBuffer<Rgb<u16>, Vec<u16>>> for SerialImageBuffer<u16>

source§

fn from(img: &ImageBuffer<Rgb<u16>, Vec<u16>>) -> SerialImageBuffer<u16>

Converts to this type from the input type.
source§

impl From<&ImageBuffer<Rgb<u8>, Vec<u8>>> for SerialImageBuffer<u8>

source§

fn from(img: &ImageBuffer<Rgb<u8>, Vec<u8>>) -> SerialImageBuffer<u8>

Converts to this type from the input type.
source§

impl From<&SerialImageBuffer<f32>> for DynamicSerialImage

source§

fn from(value: &SerialImageBuffer<f32>) -> DynamicSerialImage

Converts to this type from the input type.
source§

impl From<&SerialImageBuffer<u16>> for DynamicSerialImage

source§

fn from(value: &SerialImageBuffer<u16>) -> DynamicSerialImage

Converts to this type from the input type.
source§

impl From<&SerialImageBuffer<u8>> for DynamicSerialImage

source§

fn from(value: &SerialImageBuffer<u8>) -> DynamicSerialImage

Converts to this type from the input type.
source§

impl<T> From<ImageBuffer<Luma<T>, Vec<T>>> for SerialImageBuffer<T>
where T: Primitive,

source§

fn from(img: ImageBuffer<Luma<T>, Vec<T>>) -> SerialImageBuffer<T>

Converts to this type from the input type.
source§

impl<T> From<ImageBuffer<LumaA<T>, Vec<T>>> for SerialImageBuffer<T>
where T: Primitive,

source§

fn from(img: ImageBuffer<LumaA<T>, Vec<T>>) -> SerialImageBuffer<T>

Converts to this type from the input type.
source§

impl From<ImageBuffer<Rgb<f32>, Vec<f32>>> for SerialImageBuffer<f32>

source§

fn from(img: ImageBuffer<Rgb<f32>, Vec<f32>>) -> SerialImageBuffer<f32>

Converts to this type from the input type.
source§

impl From<ImageBuffer<Rgb<u16>, Vec<u16>>> for SerialImageBuffer<u16>

source§

fn from(img: ImageBuffer<Rgb<u16>, Vec<u16>>) -> SerialImageBuffer<u16>

Converts to this type from the input type.
source§

impl From<ImageBuffer<Rgb<u8>, Vec<u8>>> for SerialImageBuffer<u8>

source§

fn from(img: ImageBuffer<Rgb<u8>, Vec<u8>>) -> SerialImageBuffer<u8>

Converts to this type from the input type.
source§

impl From<SerialImageBuffer<f32>> for DynamicSerialImage

source§

fn from(value: SerialImageBuffer<f32>) -> DynamicSerialImage

Converts to this type from the input type.
source§

impl From<SerialImageBuffer<u16>> for DynamicSerialImage

source§

fn from(value: SerialImageBuffer<u16>) -> DynamicSerialImage

Converts to this type from the input type.
source§

impl From<SerialImageBuffer<u8>> for DynamicSerialImage

source§

fn from(value: SerialImageBuffer<u8>) -> DynamicSerialImage

Converts to this type from the input type.
source§

impl Into<DynamicImage> for &SerialImageBuffer<f32>

source§

fn into(self) -> DynamicImage

Converts this type into the (usually inferred) input type.
source§

impl Into<DynamicImage> for &SerialImageBuffer<u16>

source§

fn into(self) -> DynamicImage

Converts this type into the (usually inferred) input type.
source§

impl Into<DynamicImage> for &SerialImageBuffer<u8>

source§

fn into(self) -> DynamicImage

Converts this type into the (usually inferred) input type.
source§

impl Into<DynamicImage> for SerialImageBuffer<f32>

source§

fn into(self) -> DynamicImage

Converts this type into the (usually inferred) input type.
source§

impl Into<DynamicImage> for SerialImageBuffer<u16>

source§

fn into(self) -> DynamicImage

Converts this type into the (usually inferred) input type.
source§

impl Into<DynamicImage> for SerialImageBuffer<u8>

source§

fn into(self) -> DynamicImage

Converts this type into the (usually inferred) input type.
source§

impl<T> PartialEq for SerialImageBuffer<T>
where T: PartialEq + Primitive,

source§

fn eq(&self, other: &SerialImageBuffer<T>) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl<T> Serialize for SerialImageBuffer<T>
where T: Primitive + Serialize,

source§

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
source§

impl TryFrom<&DynamicImage> for SerialImageBuffer<f32>

§

type Error = &'static str

The type returned in the event of a conversion error.
source§

fn try_from( image: &DynamicImage ) -> Result<SerialImageBuffer<f32>, <SerialImageBuffer<f32> as TryFrom<&DynamicImage>>::Error>

Performs the conversion.
source§

impl TryFrom<&DynamicImage> for SerialImageBuffer<u16>

§

type Error = &'static str

The type returned in the event of a conversion error.
source§

fn try_from( image: &DynamicImage ) -> Result<SerialImageBuffer<u16>, <SerialImageBuffer<u16> as TryFrom<&DynamicImage>>::Error>

Performs the conversion.
source§

impl TryFrom<&DynamicImage> for SerialImageBuffer<u8>

§

type Error = &'static str

The type returned in the event of a conversion error.
source§

fn try_from( image: &DynamicImage ) -> Result<SerialImageBuffer<u8>, <SerialImageBuffer<u8> as TryFrom<&DynamicImage>>::Error>

Performs the conversion.
source§

impl TryFrom<DynamicImage> for SerialImageBuffer<f32>

§

type Error = &'static str

The type returned in the event of a conversion error.
source§

fn try_from( image: DynamicImage ) -> Result<SerialImageBuffer<f32>, <SerialImageBuffer<f32> as TryFrom<DynamicImage>>::Error>

Performs the conversion.
source§

impl TryFrom<DynamicImage> for SerialImageBuffer<u16>

§

type Error = &'static str

The type returned in the event of a conversion error.
source§

fn try_from( image: DynamicImage ) -> Result<SerialImageBuffer<u16>, <SerialImageBuffer<u16> as TryFrom<DynamicImage>>::Error>

Performs the conversion.
source§

impl TryFrom<DynamicImage> for SerialImageBuffer<u8>

§

type Error = &'static str

The type returned in the event of a conversion error.
source§

fn try_from( image: DynamicImage ) -> Result<SerialImageBuffer<u8>, <SerialImageBuffer<u8> as TryFrom<DynamicImage>>::Error>

Performs the conversion.
source§

impl<T> TryInto<ImageBuffer<Luma<T>, Vec<T>>> for &SerialImageBuffer<T>
where T: Primitive,

§

type Error = &'static str

The type returned in the event of a conversion error.
source§

fn try_into( self ) -> Result<ImageBuffer<Luma<T>, Vec<T>>, <&SerialImageBuffer<T> as TryInto<ImageBuffer<Luma<T>, Vec<T>>>>::Error>

Performs the conversion.
source§

impl<T> TryInto<ImageBuffer<Luma<T>, Vec<T>>> for SerialImageBuffer<T>
where T: Primitive,

§

type Error = &'static str

The type returned in the event of a conversion error.
source§

fn try_into( self ) -> Result<ImageBuffer<Luma<T>, Vec<T>>, <SerialImageBuffer<T> as TryInto<ImageBuffer<Luma<T>, Vec<T>>>>::Error>

Performs the conversion.
source§

impl<T> TryInto<ImageBuffer<LumaA<T>, Vec<T>>> for &SerialImageBuffer<T>
where T: Primitive,

§

type Error = &'static str

The type returned in the event of a conversion error.
source§

fn try_into( self ) -> Result<ImageBuffer<LumaA<T>, Vec<T>>, <&SerialImageBuffer<T> as TryInto<ImageBuffer<LumaA<T>, Vec<T>>>>::Error>

Performs the conversion.
source§

impl<T> TryInto<ImageBuffer<LumaA<T>, Vec<T>>> for SerialImageBuffer<T>
where T: Primitive,

§

type Error = &'static str

The type returned in the event of a conversion error.
source§

fn try_into( self ) -> Result<ImageBuffer<LumaA<T>, Vec<T>>, <SerialImageBuffer<T> as TryInto<ImageBuffer<LumaA<T>, Vec<T>>>>::Error>

Performs the conversion.
source§

impl TryInto<ImageBuffer<Rgb<f32>, Vec<f32>>> for &SerialImageBuffer<f32>

§

type Error = &'static str

The type returned in the event of a conversion error.
source§

fn try_into( self ) -> Result<ImageBuffer<Rgb<f32>, Vec<f32>>, <&SerialImageBuffer<f32> as TryInto<ImageBuffer<Rgb<f32>, Vec<f32>>>>::Error>

Performs the conversion.
source§

impl TryInto<ImageBuffer<Rgb<f32>, Vec<f32>>> for SerialImageBuffer<f32>

§

type Error = &'static str

The type returned in the event of a conversion error.
source§

fn try_into( self ) -> Result<ImageBuffer<Rgb<f32>, Vec<f32>>, <SerialImageBuffer<f32> as TryInto<ImageBuffer<Rgb<f32>, Vec<f32>>>>::Error>

Performs the conversion.
source§

impl TryInto<ImageBuffer<Rgb<u16>, Vec<u16>>> for &SerialImageBuffer<u16>

§

type Error = &'static str

The type returned in the event of a conversion error.
source§

fn try_into( self ) -> Result<ImageBuffer<Rgb<u16>, Vec<u16>>, <&SerialImageBuffer<u16> as TryInto<ImageBuffer<Rgb<u16>, Vec<u16>>>>::Error>

Performs the conversion.
source§

impl TryInto<ImageBuffer<Rgb<u16>, Vec<u16>>> for SerialImageBuffer<u16>

§

type Error = &'static str

The type returned in the event of a conversion error.
source§

fn try_into( self ) -> Result<ImageBuffer<Rgb<u16>, Vec<u16>>, <SerialImageBuffer<u16> as TryInto<ImageBuffer<Rgb<u16>, Vec<u16>>>>::Error>

Performs the conversion.
source§

impl TryInto<ImageBuffer<Rgb<u8>, Vec<u8>>> for &SerialImageBuffer<u8>

§

type Error = &'static str

The type returned in the event of a conversion error.
source§

fn try_into( self ) -> Result<ImageBuffer<Rgb<u8>, Vec<u8>>, <&SerialImageBuffer<u8> as TryInto<ImageBuffer<Rgb<u8>, Vec<u8>>>>::Error>

Performs the conversion.
source§

impl TryInto<ImageBuffer<Rgb<u8>, Vec<u8>>> for SerialImageBuffer<u8>

§

type Error = &'static str

The type returned in the event of a conversion error.
source§

fn try_into( self ) -> Result<ImageBuffer<Rgb<u8>, Vec<u8>>, <SerialImageBuffer<u8> as TryInto<ImageBuffer<Rgb<u8>, Vec<u8>>>>::Error>

Performs the conversion.
source§

impl TryInto<SerialImageBuffer<f32>> for &DynamicSerialImage

§

type Error = &'static str

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<SerialImageBuffer<f32>, &'static str>

Performs the conversion.
source§

impl TryInto<SerialImageBuffer<f32>> for DynamicSerialImage

§

type Error = &'static str

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<SerialImageBuffer<f32>, &'static str>

Performs the conversion.
source§

impl TryInto<SerialImageBuffer<u16>> for &DynamicSerialImage

§

type Error = &'static str

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<SerialImageBuffer<u16>, &'static str>

Performs the conversion.
source§

impl TryInto<SerialImageBuffer<u16>> for DynamicSerialImage

§

type Error = &'static str

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<SerialImageBuffer<u16>, &'static str>

Performs the conversion.
source§

impl TryInto<SerialImageBuffer<u8>> for &DynamicSerialImage

§

type Error = &'static str

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<SerialImageBuffer<u8>, &'static str>

Performs the conversion.
source§

impl TryInto<SerialImageBuffer<u8>> for DynamicSerialImage

§

type Error = &'static str

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<SerialImageBuffer<u8>, &'static str>

Performs the conversion.
source§

impl<T> StructuralPartialEq for SerialImageBuffer<T>
where T: Primitive,

Auto Trait Implementations§

§

impl<T> Freeze for SerialImageBuffer<T>

§

impl<T> RefUnwindSafe for SerialImageBuffer<T>
where T: RefUnwindSafe,

§

impl<T> Send for SerialImageBuffer<T>
where T: Send,

§

impl<T> Sync for SerialImageBuffer<T>
where T: Sync,

§

impl<T> Unpin for SerialImageBuffer<T>
where T: Unpin,

§

impl<T> UnwindSafe for SerialImageBuffer<T>
where T: UnwindSafe,

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T> IntoEither for T

source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> if into_left is true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> if into_left(&self) returns true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
source§

impl<T> Pointable for T

source§

const ALIGN: usize = _

The alignment of pointer.
§

type Init = T

The type for initializers.
source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
source§

impl<T> ToOwned for T
where T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,