Skip to main content

room

Function room 

Source
pub fn room(message: &Message<'_>, limit: usize) -> Option<usize>
Expand description

The bytes left under limit (the carrier’s, else the one chosen) for the media’s own bytes, all of them together, for a message whose media are given empty (their content types alone): its size so, taken from the limit, less what their lengths may add once they hold their bytes (a medium’s length is a uintvar, one byte when empty, as many as the limit’s own at most: two more each under 2 MB, three from 2 MB on). None when even that is over. A message whose media hold no more between them then fits (size).