pub struct NetworkApi<'a> { /* private fields */ }Expand description
Network API for network configuration and status
Implementations§
Source§impl<'a> NetworkApi<'a>
impl<'a> NetworkApi<'a>
pub fn new(client: &'a Client) -> Self
Sourcepub async fn get_mode(&self) -> Result<NetworkMode>
pub async fn get_mode(&self) -> Result<NetworkMode>
This endpoint does not require authentication. Returns the current network mode, network bands, and LTE bands.
Sourcepub async fn set_mode(&self, request: &NetworkModeRequest) -> Result<()>
pub async fn set_mode(&self, request: &NetworkModeRequest) -> Result<()>
This endpoint requires authentication and a valid CSRF token. Warning: This will temporarily disconnect the device while it reconnects.
Sourcepub async fn current_plmn(&self) -> Result<CurrentPlmn>
pub async fn current_plmn(&self) -> Result<CurrentPlmn>
This endpoint does not require authentication. Returns information about the current cellular network operator.
Auto Trait Implementations§
impl<'a> Freeze for NetworkApi<'a>
impl<'a> !RefUnwindSafe for NetworkApi<'a>
impl<'a> Send for NetworkApi<'a>
impl<'a> Sync for NetworkApi<'a>
impl<'a> Unpin for NetworkApi<'a>
impl<'a> UnsafeUnpin for NetworkApi<'a>
impl<'a> !UnwindSafe for NetworkApi<'a>
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