Struct libccp::DatapathBuilder[][src]

pub struct DatapathBuilder<T> { /* fields omitted */ }
Expand description

Construct a datapath object.

Example

struct Dp;
impl libccp::DatapathOps for Dp {
    fn send_msg(&mut self, msg: &[u8]) {
        println!("sent message: {:?}", msg);
    }
}

fn main() {
  let dp = Dp;
  libccp::DatapathBuilder::default().with_ops(dp).with_id(57).init();
}

Implementations

Set the id of this datapath libccp will use to identify itself to the CCP runtime.

Specify datapath-specific functionality.

To be useful, T1 should impl DatapathOps.

Trait Implementations

Formats the value using the given formatter. Read more

Returns the “default value” for a type. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.