pub struct UnifiClient { /* private fields */ }Implementations§
Source§impl UnifiClient
impl UnifiClient
pub fn new(host: &str, api_key: &str) -> Result<Self, ApiError>
pub fn clone_http(&self) -> Client
pub fn base_url(&self) -> &str
pub fn error_for_status_pub(status: u16, message: String) -> ApiError
pub async fn list_clients(&mut self) -> Result<Vec<Client>, ApiError>
pub async fn get_client_detail( &self, mac: &str, ) -> Result<LegacyClient, ApiError>
pub async fn set_fixed_ip( &self, mac: &str, ip: &str, name: Option<&str>, ) -> Result<(), ApiError>
pub async fn block_client(&self, mac: &str) -> Result<(), ApiError>
pub async fn unblock_client(&self, mac: &str) -> Result<(), ApiError>
pub async fn kick_client(&self, mac: &str) -> Result<(), ApiError>
pub async fn list_devices(&mut self) -> Result<Vec<Device>, ApiError>
pub async fn get_device_detail( &self, mac: &str, ) -> Result<LegacyDevice, ApiError>
pub async fn restart_device(&self, mac: &str) -> Result<(), ApiError>
pub async fn upgrade_device(&self, mac: &str) -> Result<(), ApiError>
pub async fn locate_device( &self, mac: &str, enable: bool, ) -> Result<(), ApiError>
pub async fn list_networks(&mut self) -> Result<Vec<Network>, ApiError>
pub async fn list_events(&self, limit: usize) -> Result<Vec<Event>, ApiError>
pub async fn get_device_ports( &self, mac: &str, ) -> Result<DeviceWithPorts, ApiError>
pub async fn list_clients_legacy(&self) -> Result<Vec<LegacyClient>, ApiError>
pub async fn get_legacy_devices(&self) -> Result<Vec<LegacyDevice>, ApiError>
pub async fn get_health(&self) -> Result<Vec<HealthSubsystem>, ApiError>
pub async fn get_sysinfo(&self) -> Result<SysInfo, ApiError>
pub async fn get_host_system(&self) -> Result<HostSystem, ApiError>
Auto Trait Implementations§
impl Freeze for UnifiClient
impl !RefUnwindSafe for UnifiClient
impl Send for UnifiClient
impl Sync for UnifiClient
impl Unpin for UnifiClient
impl UnsafeUnpin for UnifiClient
impl !UnwindSafe for UnifiClient
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
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more