pub struct SocketControlProxy { /* private fields */ }
Implementations§
Source§impl SocketControlProxy
impl SocketControlProxy
Sourcepub fn new(channel: AsyncChannel) -> Self
pub fn new(channel: AsyncChannel) -> Self
Create a new Proxy for fuchsia.net.filter/SocketControl.
Sourcepub fn take_event_stream(&self) -> SocketControlEventStream
pub fn take_event_stream(&self) -> SocketControlEventStream
Get a Stream of events from the remote end of the protocol.
§Panics
Panics if the event stream was already taken.
Sourcepub fn attach_ebpf_program(
&self,
payload: AttachEbpfProgramOptions,
) -> QueryResponseFut<SocketControlAttachEbpfProgramResult, DefaultFuchsiaResourceDialect>
pub fn attach_ebpf_program( &self, payload: AttachEbpfProgramOptions, ) -> QueryResponseFut<SocketControlAttachEbpfProgramResult, DefaultFuchsiaResourceDialect>
Attaches the specified eBPF program
to the specified hook
.
May fail if another program is already attached (potentially by another
SocketControl
instance).
Warning: Caller must check that the specified program is compatible
with the specified hook
.
Sourcepub fn detach_ebpf_program(
&self,
hook: SocketHook,
) -> QueryResponseFut<SocketControlDetachEbpfProgramResult, DefaultFuchsiaResourceDialect>
pub fn detach_ebpf_program( &self, hook: SocketHook, ) -> QueryResponseFut<SocketControlDetachEbpfProgramResult, DefaultFuchsiaResourceDialect>
Detaches eBPF program from the specified hook
.
Trait Implementations§
Source§impl Clone for SocketControlProxy
impl Clone for SocketControlProxy
Source§fn clone(&self) -> SocketControlProxy
fn clone(&self) -> SocketControlProxy
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for SocketControlProxy
impl Debug for SocketControlProxy
Source§impl Proxy for SocketControlProxy
impl Proxy for SocketControlProxy
Source§type Protocol = SocketControlMarker
type Protocol = SocketControlMarker
The protocol which this
Proxy
controls.Source§fn from_channel(inner: AsyncChannel) -> Self
fn from_channel(inner: AsyncChannel) -> Self
Create a proxy over the given channel.
Source§fn into_channel(self) -> Result<AsyncChannel, Self>
fn into_channel(self) -> Result<AsyncChannel, Self>
Attempt to convert the proxy back into a channel. Read more
Source§fn as_channel(&self) -> &AsyncChannel
fn as_channel(&self) -> &AsyncChannel
Get a reference to the proxy’s underlying channel. Read more
§fn into_client_end(self) -> Result<ClientEnd<Self::Protocol>, Self>
fn into_client_end(self) -> Result<ClientEnd<Self::Protocol>, Self>
Attempt to convert the proxy back into a client end. Read more
Source§impl SocketControlProxyInterface for SocketControlProxy
impl SocketControlProxyInterface for SocketControlProxy
type AttachEbpfProgramResponseFut = QueryResponseFut<Result<(), SocketControlAttachEbpfProgramError>>
type DetachEbpfProgramResponseFut = QueryResponseFut<Result<(), SocketControlDetachEbpfProgramError>>
fn attach_ebpf_program( &self, payload: AttachEbpfProgramOptions, ) -> Self::AttachEbpfProgramResponseFut
fn detach_ebpf_program( &self, hook: SocketHook, ) -> Self::DetachEbpfProgramResponseFut
Auto Trait Implementations§
impl Freeze for SocketControlProxy
impl !RefUnwindSafe for SocketControlProxy
impl Send for SocketControlProxy
impl Sync for SocketControlProxy
impl Unpin for SocketControlProxy
impl !UnwindSafe for SocketControlProxy
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