capnp 0.25.4

runtime library for Cap'n Proto data encoding
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
#![cfg(feature = "alloc")]

use capnp::{any_pointer, message, text};

#[test]
#[should_panic(expected = "text size too large")]
pub fn init_text_overflow() {
    let mut msg1 = message::Builder::new_default();
    let root: any_pointer::Builder = msg1.get_root().unwrap();

    let _: text::Builder = root.initn_as(u32::MAX);
}