#[non_exhaustive]pub struct StreamLimits {
pub max_line_bytes: usize,
pub max_event_bytes: usize,
pub max_total_bytes: usize,
pub max_output_bytes: usize,
pub max_items: usize,
pub max_pending_deltas: usize,
}Expand description
Limits for retained protocol state and all consumed wire bytes.
Defaults allow 32 MiB lines/events, 64 MiB total wire bytes, 16 MiB
cumulative output plus terminal snapshot, 1024 items and 4096 queued deltas.
Every limit must be positive; a zero limit is rejected when the decoder is
built. A stream that exceeds a limit fails as Undecodable.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.max_line_bytes: usizeMaximum encoded bytes in one SSE line.
max_event_bytes: usizeMaximum encoded bytes in one SSE event.
max_total_bytes: usizeMaximum consumed wire bytes, including comments and unknown events.
max_output_bytes: usizeMaximum cumulative output/metadata bytes plus authoritative snapshot.
max_items: usizeMaximum output items or tool declarations; sparse indexes allocate no gaps.
max_pending_deltas: usizeMaximum deltas awaiting delivery from one decoded event.
Trait Implementations§
Source§impl Clone for StreamLimits
impl Clone for StreamLimits
impl Copy for StreamLimits
Source§impl Debug for StreamLimits
impl Debug for StreamLimits
Auto Trait Implementations§
impl Forget for StreamLimits
impl Freeze for StreamLimits
impl Move for StreamLimits
impl RefUnwindSafe for StreamLimits
impl Send for StreamLimits
impl Sync for StreamLimits
impl Unpin for StreamLimits
impl UnsafeUnpin for StreamLimits
impl UnwindSafe for StreamLimits
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