pub struct FilterProxy { /* private fields */ }
Implementations§
Source§impl FilterProxy
impl FilterProxy
Sourcepub fn new(channel: AsyncChannel) -> Self
pub fn new(channel: AsyncChannel) -> Self
Create a new Proxy for fuchsia.net.filter.deprecated/Filter.
Sourcepub fn take_event_stream(&self) -> FilterEventStream
pub fn take_event_stream(&self) -> FilterEventStream
Get a Stream of events from the remote end of the protocol.
§Panics
Panics if the event stream was already taken.
Sourcepub fn enable_interface(
&self,
id: u64,
) -> QueryResponseFut<FilterEnableInterfaceResult, DefaultFuchsiaResourceDialect>
pub fn enable_interface( &self, id: u64, ) -> QueryResponseFut<FilterEnableInterfaceResult, DefaultFuchsiaResourceDialect>
Enable the filter on a specific interface.
The filter is disabled by default. If the filter is already enabled, no error is returned.
- request
id
The id of the network interface.
- error Reports
NOT_FOUND
ifid
is not a valid interface.
Sourcepub fn disable_interface(
&self,
id: u64,
) -> QueryResponseFut<FilterDisableInterfaceResult, DefaultFuchsiaResourceDialect>
pub fn disable_interface( &self, id: u64, ) -> QueryResponseFut<FilterDisableInterfaceResult, DefaultFuchsiaResourceDialect>
Disable the filter on a specific interface.
The filter is disabled by default. If the filter is already disabled, no error is returned.
- request
id
The id of the network interface.
- error Reports
NOT_FOUND
ifid
is not a valid interface.
Sourcepub fn get_rules(
&self,
) -> QueryResponseFut<(Vec<Rule>, u32), DefaultFuchsiaResourceDialect>
pub fn get_rules( &self, ) -> QueryResponseFut<(Vec<Rule>, u32), DefaultFuchsiaResourceDialect>
GetRules gets the current rules. They do not include NAT or RDR rules. (use GetNatRules or GetRdrRules instead).
- response
rules
The current filter rules. - response
generation
The generation number associated with the current rules.
Sourcepub fn update_rules(
&self,
rules: &[Rule],
generation: u32,
) -> QueryResponseFut<FilterUpdateRulesResult, DefaultFuchsiaResourceDialect>
pub fn update_rules( &self, rules: &[Rule], generation: u32, ) -> QueryResponseFut<FilterUpdateRulesResult, DefaultFuchsiaResourceDialect>
UpdateRules updates the current rules. It does not update NAT or RDR rules (use UpdateNatRules or UpdateRdrRules instead).
UpdateRules takes a generation number that is previously returned from GetRules. The generation number has to be up-to-date, i.e. it has to match with the one associated with the current rules. The service will assign a new generation number to the new rules.
- request
rules
The new filter rules to install. - request
generation
The generation number previously returned from GetRules.
- error Reports
GENERATION_MISMATCH
ifgeneration
is not the generation number for the current rules. - error Reports
BAD_RULE
ifrules
are not valid.
Sourcepub fn get_nat_rules(
&self,
) -> QueryResponseFut<(Vec<Nat>, u32), DefaultFuchsiaResourceDialect>
pub fn get_nat_rules( &self, ) -> QueryResponseFut<(Vec<Nat>, u32), DefaultFuchsiaResourceDialect>
GetNatRules gets the current NAT rules.
- response
rules
The current NAT rules. - response
generation
The generation number associated with the current NAT rules.
Sourcepub fn update_nat_rules(
&self,
rules: &[Nat],
generation: u32,
) -> QueryResponseFut<FilterUpdateNatRulesResult, DefaultFuchsiaResourceDialect>
pub fn update_nat_rules( &self, rules: &[Nat], generation: u32, ) -> QueryResponseFut<FilterUpdateNatRulesResult, DefaultFuchsiaResourceDialect>
UpdateNatRules updates the current NAT rules.
UpdateNatRules takes a generation number that is previously returned from GetRules. The generation number has to be up-to-date, i.e. it has to match with the one associated with the current NAT rules. The service will assign a new generation number to the new NAT rules.
- request
rules
The new NAT rules to install. - request
generation
The generation number previously returned from GetNATRules.
- error Reports
GENERATION_MISMATCH
ifgeneration
is not the generation number for the current rules. - error Reports
BAD_RULE
ifrules
are not valid.
Sourcepub fn get_rdr_rules(
&self,
) -> QueryResponseFut<(Vec<Rdr>, u32), DefaultFuchsiaResourceDialect>
pub fn get_rdr_rules( &self, ) -> QueryResponseFut<(Vec<Rdr>, u32), DefaultFuchsiaResourceDialect>
GetRdrRules gets the current RDR rules.
- response
rules
The current RDR rules. - response
generation
The generation number associated with the current RDR rules.
Sourcepub fn update_rdr_rules(
&self,
rules: &[Rdr],
generation: u32,
) -> QueryResponseFut<FilterUpdateRdrRulesResult, DefaultFuchsiaResourceDialect>
pub fn update_rdr_rules( &self, rules: &[Rdr], generation: u32, ) -> QueryResponseFut<FilterUpdateRdrRulesResult, DefaultFuchsiaResourceDialect>
UpdateRdrRules updates the previous RDR rules with new rules.
UpdateRdrRules takes a generation number that is previously returned from GetRules. The generation number has to be up-to-date, i.e. it has to match with the one associated with the current RDR rules. The service will assign a new generation number to the new RDR rules.
- request
rules
The new RDR rules to install. - request
generation
The generation number previously returned from GetRDRRules.
- error Reports
NOT_SUPPORTED
if the operation is not supported.
Sourcepub fn check_presence(
&self,
) -> QueryResponseFut<(), DefaultFuchsiaResourceDialect>
pub fn check_presence( &self, ) -> QueryResponseFut<(), DefaultFuchsiaResourceDialect>
No-op method that allows checking for presence.
It’s not currently possible for a client with an optionally-provided protocol to check whether there’s someone on the other end without making a FIDL call (https://fxbug.dev/296283299). This method provides a workaround by giving a client a two-way method that it can call to check for liveness.
Trait Implementations§
Source§impl Clone for FilterProxy
impl Clone for FilterProxy
Source§fn clone(&self) -> FilterProxy
fn clone(&self) -> FilterProxy
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreSource§impl Debug for FilterProxy
impl Debug for FilterProxy
Source§impl FilterProxyInterface for FilterProxy
impl FilterProxyInterface for FilterProxy
type EnableInterfaceResponseFut = QueryResponseFut<Result<(), EnableDisableInterfaceError>>
type DisableInterfaceResponseFut = QueryResponseFut<Result<(), EnableDisableInterfaceError>>
type GetRulesResponseFut = QueryResponseFut<(Vec<Rule>, u32)>
type UpdateRulesResponseFut = QueryResponseFut<Result<(), FilterUpdateRulesError>>
type GetNatRulesResponseFut = QueryResponseFut<(Vec<Nat>, u32)>
type UpdateNatRulesResponseFut = QueryResponseFut<Result<(), FilterUpdateNatRulesError>>
type GetRdrRulesResponseFut = QueryResponseFut<(Vec<Rdr>, u32)>
type UpdateRdrRulesResponseFut = QueryResponseFut<Result<(), FilterUpdateRdrRulesError>>
type CheckPresenceResponseFut = QueryResponseFut<()>
fn enable_interface(&self, id: u64) -> Self::EnableInterfaceResponseFut
fn disable_interface(&self, id: u64) -> Self::DisableInterfaceResponseFut
fn get_rules(&self) -> Self::GetRulesResponseFut
fn update_rules( &self, rules: &[Rule], generation: u32, ) -> Self::UpdateRulesResponseFut
fn get_nat_rules(&self) -> Self::GetNatRulesResponseFut
fn update_nat_rules( &self, rules: &[Nat], generation: u32, ) -> Self::UpdateNatRulesResponseFut
fn get_rdr_rules(&self) -> Self::GetRdrRulesResponseFut
fn update_rdr_rules( &self, rules: &[Rdr], generation: u32, ) -> Self::UpdateRdrRulesResponseFut
fn check_presence(&self) -> Self::CheckPresenceResponseFut
Source§impl Proxy for FilterProxy
impl Proxy for FilterProxy
Source§type Protocol = FilterMarker
type Protocol = FilterMarker
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 FilterProxy
impl !RefUnwindSafe for FilterProxy
impl Send for FilterProxy
impl Sync for FilterProxy
impl Unpin for FilterProxy
impl !UnwindSafe for FilterProxy
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
)