Struct rustfbp::ports::IP
[−]
[src]
pub struct IP { pub vec: Vec<u8>, pub action: String, // some fields omitted }
Represent an IP
Fields
vec: Vec<u8>
The capn'p representation
action: String
is the action of the IP
Methods
impl IP
[src]
fn new() -> Self
fn get_root<'a, T: FromPointerReader<'a>>(&'a mut self) -> Result<T>
Return a capnp Reader
Example
let ip = an_initialized_ip; { let reader: generic_text::Reader = try!(ip.get_root()); let text = try!(reader.get_text()); }Run
fn init_root<'a, T: FromPointerBuilder<'a>>(&'a mut self) -> T
Return a capnp Builder
Example
let mut ip = IP::new(); // Initialize the IP { let mut builder: generic_text::Builder = ip.init_root(); builder.set_text("Hello Fractalide!"); }Run
fn init_root_from_reader<'a, T: FromPointerBuilder<'a>, U: FromPointerReader<'a> + SetPointerBuilder<T>>(&'a mut self) -> Result<T>
Return a capnp Builder
from a capnp Reader
Example
let mut ip = an_initialized_ip; { let mut builder = try!(init_root_from_reader::<generic_text::Builder, generic_text::Reader>()); builder.set_text("Hello Fractalide!"); }Run
fn before_send(&mut self) -> Result<()>
Trait Implementations
impl Clone for IP
[src]
fn clone(&self) -> Self
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0
Performs copy-assignment from source
. Read more