pub struct MacAddressingProxy { /* private fields */ }
Implementations§
Source§impl MacAddressingProxy
impl MacAddressingProxy
Sourcepub fn new(channel: AsyncChannel) -> Self
pub fn new(channel: AsyncChannel) -> Self
Create a new Proxy for fuchsia.hardware.network/MacAddressing.
Sourcepub fn take_event_stream(&self) -> MacAddressingEventStream
pub fn take_event_stream(&self) -> MacAddressingEventStream
Get a Stream of events from the remote end of the protocol.
§Panics
Panics if the event stream was already taken.
Sourcepub fn get_unicast_address(
&self,
) -> QueryResponseFut<MacAddress, DefaultFuchsiaResourceDialect>
pub fn get_unicast_address( &self, ) -> QueryResponseFut<MacAddress, DefaultFuchsiaResourceDialect>
Gets the Device’s current unicast MAC address.
Implementers of this API do not need to return a uniquely identifiable MAC; the unicast address returned is the one that is currently in use to filter unicast frames, or that identifies the device on a link it’s currently on. Users of this API must not rely on the stability or uniqueness of the returned value to identify or disambiguate device instances.
- response
address
device’s unicast MAC address.
Sourcepub fn set_mode(
&self,
mode: MacFilterMode,
) -> QueryResponseFut<i32, DefaultFuchsiaResourceDialect>
pub fn set_mode( &self, mode: MacFilterMode, ) -> QueryResponseFut<i32, DefaultFuchsiaResourceDialect>
Sets requested operating mode of this device to mode
.
The requested mode is attached to the current client connection to the device. Because multiple clients can be attached to the same device at once, the mode with the least restrictions is the one actively put into effect into the underlying device implementation.
If the device does not support the requested mode, but supports a mode
that is more open than the requested one, SetMode
succeeds regardless.
Otherwise, if the device only supports more restrictive modes than the
one requested, SetMode
returns ZX_ERR_NOT_SUPPORTED
.
Clients must be aware that the resource being accessed is shared, and that the device may be effectively operating at a more open level than the one that was requested (although never at one more restrictive).
- request
mode
request mode to attach to.
- response
status
ZX_ERR_NOT_SUPPORTED
it the device only supports mode more restrictive than the one requested.
Sourcepub fn add_multicast_address(
&self,
address: &MacAddress,
) -> QueryResponseFut<i32, DefaultFuchsiaResourceDialect>
pub fn add_multicast_address( &self, address: &MacAddress, ) -> QueryResponseFut<i32, DefaultFuchsiaResourceDialect>
Adds multicast address to the list of multicast groups.
The list of multicast addresses kept is untouched by calls to SetMode
.
If the device’s mode is not MULTICAST_FILTER
, the list of multicast
addresses is ignored.
- request
address
multicast address to add to the list.
- response
status
ZX_ERR_INVALID_ARGS
ifaddress
is not a multicast address.
Sourcepub fn remove_multicast_address(
&self,
address: &MacAddress,
) -> QueryResponseFut<i32, DefaultFuchsiaResourceDialect>
pub fn remove_multicast_address( &self, address: &MacAddress, ) -> QueryResponseFut<i32, DefaultFuchsiaResourceDialect>
Removes multicast address from the list of multicast groups.
- request
address
multicast address to remove from the list.
- response
status
ZX_ERR_INVALID_ARGS
ifaddress
is not a multicast address.
Trait Implementations§
Source§impl Clone for MacAddressingProxy
impl Clone for MacAddressingProxy
Source§fn clone(&self) -> MacAddressingProxy
fn clone(&self) -> MacAddressingProxy
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreSource§impl Debug for MacAddressingProxy
impl Debug for MacAddressingProxy
Source§impl MacAddressingProxyInterface for MacAddressingProxy
impl MacAddressingProxyInterface for MacAddressingProxy
type GetUnicastAddressResponseFut = QueryResponseFut<MacAddress>
type SetModeResponseFut = QueryResponseFut<i32>
type AddMulticastAddressResponseFut = QueryResponseFut<i32>
type RemoveMulticastAddressResponseFut = QueryResponseFut<i32>
fn get_unicast_address(&self) -> Self::GetUnicastAddressResponseFut
fn set_mode(&self, mode: MacFilterMode) -> Self::SetModeResponseFut
fn add_multicast_address( &self, address: &MacAddress, ) -> Self::AddMulticastAddressResponseFut
fn remove_multicast_address( &self, address: &MacAddress, ) -> Self::RemoveMulticastAddressResponseFut
Source§impl Proxy for MacAddressingProxy
impl Proxy for MacAddressingProxy
Source§type Protocol = MacAddressingMarker
type Protocol = MacAddressingMarker
Proxy
controls.Source§fn from_channel(inner: AsyncChannel) -> Self
fn from_channel(inner: AsyncChannel) -> Self
Source§fn into_channel(self) -> Result<AsyncChannel, Self>
fn into_channel(self) -> Result<AsyncChannel, Self>
Source§fn as_channel(&self) -> &AsyncChannel
fn as_channel(&self) -> &AsyncChannel
§fn into_client_end(self) -> Result<ClientEnd<Self::Protocol>, Self>
fn into_client_end(self) -> Result<ClientEnd<Self::Protocol>, Self>
Auto Trait Implementations§
impl Freeze for MacAddressingProxy
impl !RefUnwindSafe for MacAddressingProxy
impl Send for MacAddressingProxy
impl Sync for MacAddressingProxy
impl Unpin for MacAddressingProxy
impl !UnwindSafe for MacAddressingProxy
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
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)
clone_to_uninit
)