pub enum AddressStateProviderRequest {
UpdateAddressProperties {
address_properties: AddressProperties,
responder: AddressStateProviderUpdateAddressPropertiesResponder,
},
WatchAddressAssignmentState {
responder: AddressStateProviderWatchAddressAssignmentStateResponder,
},
Detach {
control_handle: AddressStateProviderControlHandle,
},
Remove {
control_handle: AddressStateProviderControlHandle,
},
}
Expand description
Offers state information about an IP address.
This protocol encodes the underlying object’s lifetime in both directions;
the underlying object is alive iff both ends of the protocol are open
(unless [AddressStateProvider.Detach
] has been called). That is:
- Closing the client end causes the object to be destroyed.
- Observing a closure of the server end indicates the object no longer exists.
Variants§
UpdateAddressProperties
Push an update when the address properties change.
The client pushes updates on address properties changes, such as the address becoming deprecated, or the preferred and valid lifetimes being updated as a result of extending the address’ lifetime. The server is expected to cache address properties.
If address_properties
contains invalid property values, the address is
removed and [AddressRemovalReason.INVALID_PROPERTIES
] is issued.
- request
address_properties
the updated properties of the address.
Fields
address_properties: AddressProperties
WatchAddressAssignmentState
Hanging get for address assignment state.
The server does not keep a queue of assignment states, it returns the latest state if it differs from the last one observed.
The first call will always immediately return the current assignment state. Subsequent calls will block until the returned value differs from the last observed value.
It is invalid to call this method while a previous call is pending. Doing so will cause the server end of the protocol to be closed.
- response
assignment_state
the assignment state of the address.
Fields
Detach
Detaches the address’ lifetime from the client end of the protocol.
The client end of the protocol can be closed immediately after calling this method, and the address will not be removed.
Fields
control_handle: AddressStateProviderControlHandle
Remove
Removes the address.
The server end of the protocol is closed after address removal has
completed, and the USER_REMOVED
OnAddressRemoved
event is sent.
Fields
control_handle: AddressStateProviderControlHandle
Implementations§
Source§impl AddressStateProviderRequest
impl AddressStateProviderRequest
pub fn into_update_address_properties( self, ) -> Option<(AddressProperties, AddressStateProviderUpdateAddressPropertiesResponder)>
pub fn into_watch_address_assignment_state( self, ) -> Option<AddressStateProviderWatchAddressAssignmentStateResponder>
pub fn into_detach(self) -> Option<AddressStateProviderControlHandle>
pub fn into_remove(self) -> Option<AddressStateProviderControlHandle>
Sourcepub fn method_name(&self) -> &'static str
pub fn method_name(&self) -> &'static str
Name of the method defined in FIDL