Enum symphonia_core::meta::Limit
source · pub enum Limit {
None,
Default,
Maximum(usize),
}
Expand description
Limit
defines an upper-bound on how much of a resource should be allocated when the amount to
be allocated is specified by the media stream, which is untrusted. A limit will place an
upper-bound on this allocation at the risk of breaking potentially valid streams. Limits are
used to prevent denial-of-service attacks.
All limits can be defaulted to a reasonable value specific to the situation. These defaults will generally not break any normal streams.
Variants§
None
Do not impose any limit.
Default
Use the a reasonable default specified by the FormatReader
or Decoder
implementation.
Maximum(usize)
Specify the upper limit of the resource. Units are case specific.
Implementations§
Trait Implementations§
impl Copy for Limit
Auto Trait Implementations§
impl RefUnwindSafe for Limit
impl Send for Limit
impl Sync for Limit
impl Unpin for Limit
impl UnwindSafe for Limit
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