[−][src]Module no_proto::pointer::string
NoProto supports Rust's native UTF8 String
type.
use no_proto::error::NP_Error; use no_proto::NP_Factory; let factory: NP_Factory = NP_Factory::new(r#"{ "type": "string" }"#)?; let mut new_buffer = factory.empty_buffer(None, None); new_buffer.set("", String::from("I want to play a game"))?; assert_eq!(Box::new(String::from("I want to play a game")), new_buffer.get::<String>("")?.unwrap());