pub struct Png(/* private fields */);Expand description
An encoded PNG image, and the media marker for frame blobs.
Implementations§
Source§impl Png
impl Png
Sourcepub fn encode(frame: &Frame) -> Result<Png, TraceError>
pub fn encode(frame: &Frame) -> Result<Png, TraceError>
Encodes frame as an 8-bit RGBA PNG with fixed compression and filter settings, so the
same pixels always give the same bytes.
Sourcepub fn from_bytes(bytes: Vec<u8>) -> Result<Png, TraceError>
pub fn from_bytes(bytes: Vec<u8>) -> Result<Png, TraceError>
Wraps bytes that are already a PNG. Only the signature is checked.
Sourcepub fn into_bytes(self) -> Vec<u8> ⓘ
pub fn into_bytes(self) -> Vec<u8> ⓘ
The encoded bytes, taking ownership.
Trait Implementations§
impl Eq for Png
impl StructuralPartialEq for Png
Auto Trait Implementations§
impl Forget for Png
impl Freeze for Png
impl Move for Png
impl RefUnwindSafe for Png
impl Send for Pngwhere
RawVecInner: Send,
impl Sync for Pngwhere
RawVecInner: Sync,
impl Unpin for Png
impl UnsafeUnpin for Png
impl UnwindSafe for Pngwhere
RawVecInner: UnwindSafe,
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.