| 1 | #![cfg_attr(not(feature = "use_std"), no_std)] |
| 2 | |
| 3 | // In the future, don't do this. |
| 4 | mod decrust-analyzer cargo cobs 0.2.3 dec/; |
| 5 | mod encrust-analyzer cargo cobs 0.2.3 enc/; |
| 6 | pub use craterust-analyzer cargo cobs 0.2.3 crate/::decrust-analyzer cargo cobs 0.2.3 dec/::*; |
| 7 | pub use craterust-analyzer cargo cobs 0.2.3 crate/::encrust-analyzer cargo cobs 0.2.3 enc/::*; |
| 8 | |
| 9 | /// Calculates the maximum possible size of an encoded message given the length |
| 10 | /// of the source message. This may be useful for calculating how large the |
| 11 | /// `dest` buffer needs to be in the encoding functions. |
| 12 | pub fn max_encoding_lengthrust-analyzer cargo cobs 0.2.3 max_encoding_length().(source_len: usize) -> usize { |
| 13 | source_len rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`Add<Self>`]add().+rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`Add<Self>`]add(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`Add<Self>`]add().(source_len rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`Div<Self>`]div()./rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`Div<Self>`]div(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`Div<Self>`]div().254) rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`Add<Self>`]add().+rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`Add<Self>`]add(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`Add<Self>`]add().if source_len rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`Rem<Self>`]rem().%rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`Rem<Self>`]rem(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`Rem<Self>`]rem().254 rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[usize][`PartialOrd<Self>`]gt().>rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[usize][`PartialOrd<Self>`]gt(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[usize][`PartialOrd<Self>`]gt().0 { 1 } else { 0 } |
| 14 | } |