pub struct ProviderProxy { /* private fields */ }
Implementations§
Source§impl ProviderProxy
impl ProviderProxy
Sourcepub fn new(channel: AsyncChannel) -> Self
pub fn new(channel: AsyncChannel) -> Self
Create a new Proxy for fuchsia.posix.socket/Provider.
Sourcepub fn take_event_stream(&self) -> ProviderEventStream
pub fn take_event_stream(&self) -> ProviderEventStream
Get a Stream of events from the remote end of the protocol.
§Panics
Panics if the event stream was already taken.
Sourcepub fn stream_socket(
&self,
domain: Domain,
proto: StreamSocketProtocol,
) -> QueryResponseFut<ProviderStreamSocketResult, DefaultFuchsiaResourceDialect>
pub fn stream_socket( &self, domain: Domain, proto: StreamSocketProtocol, ) -> QueryResponseFut<ProviderStreamSocketResult, DefaultFuchsiaResourceDialect>
Requests a stream socket with the specified parameters.
Sourcepub fn datagram_socket_deprecated(
&self,
domain: Domain,
proto: DatagramSocketProtocol,
) -> QueryResponseFut<ProviderDatagramSocketDeprecatedResult, DefaultFuchsiaResourceDialect>
pub fn datagram_socket_deprecated( &self, domain: Domain, proto: DatagramSocketProtocol, ) -> QueryResponseFut<ProviderDatagramSocketDeprecatedResult, DefaultFuchsiaResourceDialect>
Requests a datagram socket with the specified parameters. TODO(https://fxbug.dev/42165881): Remove this method once no more callers rely on it.
Sourcepub fn datagram_socket(
&self,
domain: Domain,
proto: DatagramSocketProtocol,
) -> QueryResponseFut<ProviderDatagramSocketResult, DefaultFuchsiaResourceDialect>
pub fn datagram_socket( &self, domain: Domain, proto: DatagramSocketProtocol, ) -> QueryResponseFut<ProviderDatagramSocketResult, DefaultFuchsiaResourceDialect>
Requests a datagram socket with the specified parameters.
Sourcepub fn interface_index_to_name(
&self,
index: u64,
) -> QueryResponseFut<ProviderInterfaceIndexToNameResult, DefaultFuchsiaResourceDialect>
pub fn interface_index_to_name( &self, index: u64, ) -> QueryResponseFut<ProviderInterfaceIndexToNameResult, DefaultFuchsiaResourceDialect>
Looks up an interface by its index and returns its name. Returns
ZX_ERR_NOT_FOUND
if the specified index doesn’t exist.
Sourcepub fn interface_name_to_index(
&self,
name: &str,
) -> QueryResponseFut<ProviderInterfaceNameToIndexResult, DefaultFuchsiaResourceDialect>
pub fn interface_name_to_index( &self, name: &str, ) -> QueryResponseFut<ProviderInterfaceNameToIndexResult, DefaultFuchsiaResourceDialect>
Looks up an interface by its name and returns its index. Returns
ZX_ERR_NOT_FOUND
if the specified name doesn’t exist.
Sourcepub fn interface_name_to_flags(
&self,
name: &str,
) -> QueryResponseFut<ProviderInterfaceNameToFlagsResult, DefaultFuchsiaResourceDialect>
pub fn interface_name_to_flags( &self, name: &str, ) -> QueryResponseFut<ProviderInterfaceNameToFlagsResult, DefaultFuchsiaResourceDialect>
Looks up an interface by its name and returns its flags. Returns
ZX_ERR_NOT_FOUND
if the specified name doesn’t exist.
Sourcepub fn get_interface_addresses(
&self,
) -> QueryResponseFut<Vec<InterfaceAddresses>, DefaultFuchsiaResourceDialect>
pub fn get_interface_addresses( &self, ) -> QueryResponseFut<Vec<InterfaceAddresses>, DefaultFuchsiaResourceDialect>
Requests a list of [fuchsia.posix.socket.InterfaceAddresses
]
describing the network interfaces on the system.
Trait Implementations§
Source§impl Clone for ProviderProxy
impl Clone for ProviderProxy
Source§fn clone(&self) -> ProviderProxy
fn clone(&self) -> ProviderProxy
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreSource§impl Debug for ProviderProxy
impl Debug for ProviderProxy
Source§impl ProviderProxyInterface for ProviderProxy
impl ProviderProxyInterface for ProviderProxy
type StreamSocketResponseFut = QueryResponseFut<Result<ClientEnd<StreamSocketMarker>, Errno>>
type DatagramSocketDeprecatedResponseFut = QueryResponseFut<Result<ClientEnd<SynchronousDatagramSocketMarker>, Errno>>
type DatagramSocketResponseFut = QueryResponseFut<Result<ProviderDatagramSocketResponse, Errno>>
type InterfaceIndexToNameResponseFut = QueryResponseFut<Result<String, i32>>
type InterfaceNameToIndexResponseFut = QueryResponseFut<Result<u64, i32>>
type InterfaceNameToFlagsResponseFut = QueryResponseFut<Result<InterfaceFlags, i32>>
type GetInterfaceAddressesResponseFut = QueryResponseFut<Vec<InterfaceAddresses>>
fn stream_socket( &self, domain: Domain, proto: StreamSocketProtocol, ) -> Self::StreamSocketResponseFut
fn datagram_socket_deprecated( &self, domain: Domain, proto: DatagramSocketProtocol, ) -> Self::DatagramSocketDeprecatedResponseFut
fn datagram_socket( &self, domain: Domain, proto: DatagramSocketProtocol, ) -> Self::DatagramSocketResponseFut
fn interface_index_to_name( &self, index: u64, ) -> Self::InterfaceIndexToNameResponseFut
fn interface_name_to_index( &self, name: &str, ) -> Self::InterfaceNameToIndexResponseFut
fn interface_name_to_flags( &self, name: &str, ) -> Self::InterfaceNameToFlagsResponseFut
fn get_interface_addresses(&self) -> Self::GetInterfaceAddressesResponseFut
Source§impl Proxy for ProviderProxy
impl Proxy for ProviderProxy
Source§type Protocol = ProviderMarker
type Protocol = ProviderMarker
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 ProviderProxy
impl !RefUnwindSafe for ProviderProxy
impl Send for ProviderProxy
impl Sync for ProviderProxy
impl Unpin for ProviderProxy
impl !UnwindSafe for ProviderProxy
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
)