pub fn new_pixel_format(&self, format: PixelFormatEnum) -> Result<PixelFormat<'_>, String> {
    match NonNull::new(unsafe { SDL_AllocFormat(format as u32) }) {
      Some(nn) => Ok(PixelFormat {
        nn,
        _marker: PhantomData,
      }),
      None => Err(get_error()),
    }
  }
/// Allocates a new `PixelFormat` according to the enum given.
Allocates a new `PixelFormat` according to the enum given.
Allocates a new ` PixelFormat ` according to the enum given .
pub fn new_pixel_format(&self, format: PixelFormatEnum) -> Result<PixelFormat<'_>, String> {
    match NonNull::new(unsafe { SDL_AllocFormat(format as u32) }) {
      Some(nn) => Ok(PixelFormat {
        nn,
        _marker: PhantomData,
      }),
      None => Err(get_error()),
    }
  }
pub fn new_pixel_format ( & self , format : PixelFormatEnum ) -> Result < PixelFormat < ' _ > , String > { match NonNull :: new ( unsafe { SDL_AllocFormat ( format as u32 ) } ) { Some ( nn ) => Ok ( PixelFormat { nn , _marker : PhantomData , } ) , None => Err ( get_error ( ) ) , } }
Allocates a new `PixelFormat` according to the enum given.
Allocates a new ` PixelFormat ` according to the enum given .
&self
format
PixelFormatEnum
&self
format
PixelFormatEnum