Struct uhppote_rs::Uhppoted
source · [−]pub struct Uhppoted { /* private fields */ }Implementations
sourceimpl Uhppoted
impl Uhppoted
sourcepub fn new(
bind: SocketAddr,
broadcast: SocketAddr,
listen: Option<SocketAddr>,
timeout: i32,
controllers: Vec<Controller>,
debug: bool
) -> Result<Uhppoted>
pub fn new(
bind: SocketAddr,
broadcast: SocketAddr,
listen: Option<SocketAddr>,
timeout: i32,
controllers: Vec<Controller>,
debug: bool
) -> Result<Uhppoted>
Create a new Uhppote struct
Example:
use uhppote_rs::Uhppoted;
let mut uhppoted = UUhppoted::new(
"0.0.0.0:0".parse().unwrap(),
"255.255.255.255:60000".parse().unwrap(),
None,
5000,
Vec::new(),
false,
)
.unwrap()sourcepub fn get_devices(&mut self) -> Result<Vec<u32>>
pub fn get_devices(&mut self) -> Result<Vec<u32>>
Get all device on the network. This uses the broadcast address to find devices and returns a list of identifiers.
pub fn get_device(&mut self, id: u32) -> Result<Device<'_>>
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for Uhppoted
impl !Send for Uhppoted
impl !Sync for Uhppoted
impl Unpin for Uhppoted
impl UnwindSafe for Uhppoted
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more