pub struct DatapathBuilder<T> { /* private fields */ }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§
Source§impl<T> DatapathBuilder<T>
impl<T> DatapathBuilder<T>
Source§impl<T: DatapathOps + 'static> DatapathBuilder<T>
impl<T: DatapathOps + 'static> DatapathBuilder<T>
pub fn init(self) -> Result<Datapath, LibccpError>
Trait Implementations§
Source§impl<T: Debug> Debug for DatapathBuilder<T>
impl<T: Debug> Debug for DatapathBuilder<T>
Auto Trait Implementations§
impl<T> Freeze for DatapathBuilder<T>where
T: Freeze,
impl<T> RefUnwindSafe for DatapathBuilder<T>where
T: RefUnwindSafe,
impl<T> Send for DatapathBuilder<T>where
T: Send,
impl<T> Sync for DatapathBuilder<T>where
T: Sync,
impl<T> Unpin for DatapathBuilder<T>where
T: Unpin,
impl<T> UnwindSafe for DatapathBuilder<T>where
T: UnwindSafe,
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more