pub struct Decoder { /* private fields */ }Expand description
Stateful decoder that enforces a per-tile memory budget during decoding.
Pass a Decoder to every raw.decode() / into_tile() call and to
from_bytes-style parsers. Each method charges the budget before
performing heap allocations, so the total heap used never exceeds max_bytes
(in bytes).
use mlt_core::Decoder;
// Default: 10 MiB budget.
let mut dec = Decoder::default();
// Custom budget.
let mut dec = Decoder::with_max_size(64 * 1024 * 1024);Implementations§
Trait Implementations§
impl Eq for Decoder
impl StructuralPartialEq for Decoder
Auto Trait Implementations§
impl Freeze for Decoder
impl RefUnwindSafe for Decoder
impl Send for Decoder
impl Sync for Decoder
impl Unpin for Decoder
impl UnsafeUnpin for Decoder
impl UnwindSafe for Decoder
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