pub struct DeviceManager {
pub device: HashMap<Uuid, Device>,
/* private fields */
}Fields§
§device: HashMap<Uuid, Device>Implementations§
Source§impl DeviceManager
impl DeviceManager
pub async fn continuous_mode_start( &mut self, subscriber: Receiver<ProtocolMessage>, device_id: Uuid, device_type: DeviceSelection, ) -> Option<JoinHandle<()>>
pub async fn continuous_mode_startup_routine( &self, device_id: Uuid, device_type: DeviceSelection, ) -> Result<(), ManagerError>
pub async fn continuous_mode_shutdown_routine( &self, device_id: Uuid, device_type: DeviceSelection, ) -> Result<(), ManagerError>
pub fn ping1d_continuous_mode_helper(msg: ProtocolMessage, device_id: Uuid)
pub fn ping360_continuous_mode_helper(msg: Messages, device_id: Uuid)
pub fn handle_error_continuous_mode(error: RecvError, device_id: Uuid)
Source§impl DeviceManager
impl DeviceManager
pub fn check_device_uuid(&self, device_id: Uuid) -> Result<(), ManagerError>
pub fn get_device(&self, device_id: Uuid) -> Result<&Device, ManagerError>
pub async fn get_device_handler( &self, device_id: Uuid, ) -> Result<Answer, ManagerError>
pub fn check_device_status( &self, device_id: Uuid, valid_statuses: &[DeviceStatus], ) -> Result<(), ManagerError>
pub fn get_mut_device( &mut self, device_id: Uuid, ) -> Result<&mut Device, ManagerError>
pub fn get_device_type( &self, device_id: Uuid, ) -> Result<DeviceSelection, ManagerError>
pub fn extract_handler( &self, device_handler: Answer, ) -> Result<DeviceActorHandler, ManagerError>
pub async fn get_subscriber( &self, device_id: Uuid, ) -> Result<Receiver<ProtocolMessage>, ManagerError>
Source§impl DeviceManager
impl DeviceManager
pub fn new(size: usize) -> (Self, ManagerActorHandler)
pub async fn run(self)
pub async fn update_devices_status(&mut self)
pub async fn create( &mut self, source: SourceSelection, device_selection: DeviceSelection, ) -> Result<Answer, ManagerError>
pub async fn auto_create(&mut self) -> Result<Answer, ManagerError>
pub async fn list(&self) -> Result<Answer, ManagerError>
pub async fn info(&self, device_id: Uuid) -> Result<Answer, ManagerError>
pub async fn delete(&mut self, device_id: Uuid) -> Result<Answer, ManagerError>
pub async fn continuous_mode( &mut self, device_id: Uuid, ) -> Result<Answer, ManagerError>
pub async fn continuous_mode_off( &mut self, device_id: Uuid, ) -> Result<Answer, ManagerError>
pub async fn modify_device( &mut self, request: ModifyDevice, ) -> Result<Answer, ManagerError>
pub async fn modify_device_ip( &mut self, ip: Ipv4Addr, destination: Ipv4Addr, ) -> Result<(), ManagerError>
Auto Trait Implementations§
impl Freeze for DeviceManager
impl RefUnwindSafe for DeviceManager
impl Send for DeviceManager
impl Sync for DeviceManager
impl Unpin for DeviceManager
impl UnwindSafe for DeviceManager
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