pub enum Params {
Virtual,
Tcp {
addr: String,
port: u16,
peers: Vec<String>,
dynamic: bool,
},
LocalUpd {
addr: String,
},
}Expand description
A wrapper type for parameters that are required for an endpoint
Variants§
Virtual
Virtual testing endpoint purely in memory
Because it is only used to connect with one other endpoint in memory no parameters are required to make a network of virtual endpoints work.
Tcp
Internet tcp overlay endpoint
To initialise this module requires a bind address, and a port.
Optionally a dynamic flag can be passed along which will set
up the endpoint to accept new peers introduced dynamically.
LocalUpd
Purely local udp broadcast endpoint
Because of how multicast works on Linux, all udp modules in a network need to be running on the same port. This means that two udp endpoints can’t be running on the same computer at the same time for testing purposes, without network namespaces.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Params
impl RefUnwindSafe for Params
impl Send for Params
impl Sync for Params
impl Unpin for Params
impl UnwindSafe for Params
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