Struct gif::MemoryLimit [−][src]
pub struct MemoryLimit(pub u32);
Expand description
Memory limit in bytes. MemoryLimit(0)
means
that there is no memory limit set.
Tuple Fields
0: u32
Implementations
Enforce no memory limit.
If you intend to process images from unknown origins this is a potentially dangerous constant to use, as your program could be vulnerable to decompression bombs. That is, malicious images crafted specifically to require an enormous amount of memory to process while having a disproportionately small file size.
The risks for modern machines are a bit smaller as the dimensions of each frame can not
exceed u32::MAX
(~4Gb) but this is still a significant amount of memory.
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for MemoryLimit
impl Send for MemoryLimit
impl Sync for MemoryLimit
impl Unpin for MemoryLimit
impl UnwindSafe for MemoryLimit
Blanket Implementations
Mutably borrows from an owned value. Read more