Trait pnm::pam::PAMBit

source ·
pub trait PAMBit {
    // Required methods
    fn encode_bitmap(self) -> Vec<u8>;
    unsafe fn encode_into(x: Self, out: *mut u8) -> usize;
}
Expand description

Bool images. Unstable api.

Required Methods§

source

fn encode_bitmap(self) -> Vec<u8>

Encode this bit image to pam.

source

unsafe fn encode_into(x: Self, out: *mut u8) -> usize

Encodes directly into a buffer. Returns number of bytes written. Buffer should have at least size bytes.

§Safety

Undefined Behaviour when the buffer’s length is less than size(bytes).

Object Safety§

This trait is not object safe.

Implementations on Foreign Types§

source§

impl<T: AsRef<[bool]>> PAMBit for Image<T, 1>

source§

fn encode_bitmap(self) -> Vec<u8>

source§

unsafe fn encode_into(x: Self, out: *mut u8) -> usize

Implementors§