pub struct Amf0Limits {
pub max_depth: usize,
pub max_values: usize,
}Expand description
The two bounds AMF0 decoding needs, both chosen by the caller: the crate supplies neither.
max_depth bounds container nesting (Object/ECMA Array/Strict Array) so a pathologically
nested input returns RtmpError::Amf0DepthExceeded instead of overflowing the native call
stack; the guard is checked on entering each nested container. max_values bounds width:
millions of one-byte nulls inside a Strict Array, or three-byte empty-key pairs inside an
Object, otherwise expand into millions of Amf0Values from a single message; a decode past it
returns RtmpError::Amf0TooManyValues.
Fields§
§max_depth: usizeDeepest container nesting a decode descends into.
max_values: usizeMost values one byte sequence may decode into, at any nesting level.
Trait Implementations§
Source§impl Clone for Amf0Limits
impl Clone for Amf0Limits
impl Copy for Amf0Limits
Source§impl Debug for Amf0Limits
impl Debug for Amf0Limits
Source§impl<'de> Deserialize<'de> for Amf0Limits
Available on crate feature serde only.
impl<'de> Deserialize<'de> for Amf0Limits
Available on crate feature
serde only.Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for Amf0Limits
Source§impl PartialEq for Amf0Limits
impl PartialEq for Amf0Limits
Source§impl Serialize for Amf0Limits
Available on crate feature serde only.
impl Serialize for Amf0Limits
Available on crate feature
serde only.impl StructuralPartialEq for Amf0Limits
Auto Trait Implementations§
impl Forget for Amf0Limits
impl Freeze for Amf0Limits
impl Move for Amf0Limits
impl RefUnwindSafe for Amf0Limits
impl Send for Amf0Limits
impl Sync for Amf0Limits
impl Unpin for Amf0Limits
impl UnsafeUnpin for Amf0Limits
impl UnwindSafe for Amf0Limits
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