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_with_options(
&self,
domain: Domain,
proto: StreamSocketProtocol,
opts: SocketCreationOptions,
) -> QueryResponseFut<ProviderStreamSocketWithOptionsResult, DefaultFuchsiaResourceDialect> ⓘ
pub fn stream_socket_with_options( &self, domain: Domain, proto: StreamSocketProtocol, opts: SocketCreationOptions, ) -> QueryResponseFut<ProviderStreamSocketWithOptionsResult, DefaultFuchsiaResourceDialect> ⓘ
Requests a stream socket with the specified parameters and the creation options.
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 datagram_socket_with_options(
&self,
domain: Domain,
proto: DatagramSocketProtocol,
opts: SocketCreationOptions,
) -> QueryResponseFut<ProviderDatagramSocketWithOptionsResult, DefaultFuchsiaResourceDialect> ⓘ
pub fn datagram_socket_with_options( &self, domain: Domain, proto: DatagramSocketProtocol, opts: SocketCreationOptions, ) -> QueryResponseFut<ProviderDatagramSocketWithOptionsResult, DefaultFuchsiaResourceDialect> ⓘ
Requests a datagram socket with the specified parameters and the creation options.
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§impl Debug for ProviderProxy
impl Debug for ProviderProxy
Source§impl ProviderProxyInterface for ProviderProxy
impl ProviderProxyInterface for ProviderProxy
type StreamSocketWithOptionsResponseFut = QueryResponseFut<Result<ClientEnd<StreamSocketMarker>, Errno>>
type StreamSocketResponseFut = QueryResponseFut<Result<ClientEnd<StreamSocketMarker>, Errno>>
type DatagramSocketDeprecatedResponseFut = QueryResponseFut<Result<ClientEnd<SynchronousDatagramSocketMarker>, Errno>>
type DatagramSocketResponseFut = QueryResponseFut<Result<ProviderDatagramSocketResponse, Errno>>
type DatagramSocketWithOptionsResponseFut = QueryResponseFut<Result<ProviderDatagramSocketWithOptionsResponse, 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_with_options( &self, domain: Domain, proto: StreamSocketProtocol, opts: SocketCreationOptions, ) -> Self::StreamSocketWithOptionsResponseFut
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 datagram_socket_with_options( &self, domain: Domain, proto: DatagramSocketProtocol, opts: SocketCreationOptions, ) -> Self::DatagramSocketWithOptionsResponseFut
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.