Skip to main content

MAX_MESSAGE_SIZE

Constant MAX_MESSAGE_SIZE 

Source
pub const MAX_MESSAGE_SIZE: usize = _; // 4_194_304usize
Expand description

Default message size limit (4 MB).

Mirrors tonic’s own default and the value enforced on the client side via crate::Client::Shared::MAX_MESSAGE_SIZE_BYTES. Apply this to every service wrapper via .max_decoding_message_size() / .max_encoding_message_size() before add_service so unary calls fail fast for oversized payloads.