pub struct Control { /* private fields */ }
Expand description
A wrapper for fuchsia.net.interfaces.admin/Control that observes terminal events.
Implementations§
Source§impl Control
impl Control
Sourcepub fn add_address(
&self,
address: &Subnet,
parameters: &AddressParameters,
address_state_provider: ServerEnd<AddressStateProviderMarker>,
) -> Result<(), TerminalError<InterfaceRemovedReason>>
pub fn add_address( &self, address: &Subnet, parameters: &AddressParameters, address_state_provider: ServerEnd<AddressStateProviderMarker>, ) -> Result<(), TerminalError<InterfaceRemovedReason>>
Calls AddAddress
on the proxy.
Sourcepub async fn get_id(&self) -> Result<u64, TerminalError<InterfaceRemovedReason>>
pub async fn get_id(&self) -> Result<u64, TerminalError<InterfaceRemovedReason>>
Calls GetId
on the proxy.
Sourcepub async fn remove_address(
&self,
address: &Subnet,
) -> Result<ControlRemoveAddressResult, TerminalError<InterfaceRemovedReason>>
pub async fn remove_address( &self, address: &Subnet, ) -> Result<ControlRemoveAddressResult, TerminalError<InterfaceRemovedReason>>
Calls RemoveAddress
on the proxy.
Sourcepub async fn set_configuration(
&self,
config: &Configuration,
) -> Result<ControlSetConfigurationResult, TerminalError<InterfaceRemovedReason>>
pub async fn set_configuration( &self, config: &Configuration, ) -> Result<ControlSetConfigurationResult, TerminalError<InterfaceRemovedReason>>
Calls SetConfiguration
on the proxy.
Sourcepub async fn get_configuration(
&self,
) -> Result<ControlGetConfigurationResult, TerminalError<InterfaceRemovedReason>>
pub async fn get_configuration( &self, ) -> Result<ControlGetConfigurationResult, TerminalError<InterfaceRemovedReason>>
Calls GetConfiguration
on the proxy.
Calls GetAuthorizationForInterface
on the proxy.
Sourcepub async fn enable(
&self,
) -> Result<ControlEnableResult, TerminalError<InterfaceRemovedReason>>
pub async fn enable( &self, ) -> Result<ControlEnableResult, TerminalError<InterfaceRemovedReason>>
Calls Enable
on the proxy.
Sourcepub async fn remove(
&self,
) -> Result<ControlRemoveResult, TerminalError<InterfaceRemovedReason>>
pub async fn remove( &self, ) -> Result<ControlRemoveResult, TerminalError<InterfaceRemovedReason>>
Calls Remove
on the proxy.
Sourcepub async fn disable(
&self,
) -> Result<ControlDisableResult, TerminalError<InterfaceRemovedReason>>
pub async fn disable( &self, ) -> Result<ControlDisableResult, TerminalError<InterfaceRemovedReason>>
Calls Disable
on the proxy.
Sourcepub fn detach(&self) -> Result<(), TerminalError<InterfaceRemovedReason>>
pub fn detach(&self) -> Result<(), TerminalError<InterfaceRemovedReason>>
Calls Detach
on the proxy.
Sourcepub fn new(proxy: ControlProxy) -> Self
pub fn new(proxy: ControlProxy) -> Self
Creates a new Control
wrapper from proxy
.
Sourcepub async fn wait_termination(self) -> TerminalError<InterfaceRemovedReason>
pub async fn wait_termination(self) -> TerminalError<InterfaceRemovedReason>
Waits for interface removal.
Sourcepub fn create_endpoints() -> Result<(Self, ServerEnd<ControlMarker>), Error>
pub fn create_endpoints() -> Result<(Self, ServerEnd<ControlMarker>), Error>
Creates a new Control
and its ServerEnd
.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Control
impl !RefUnwindSafe for Control
impl Send for Control
impl Sync for Control
impl Unpin for Control
impl !UnwindSafe for Control
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)