pub struct FilterSynchronousProxy { /* private fields */ }
Implementations§
Source§impl FilterSynchronousProxy
impl FilterSynchronousProxy
pub fn new(channel: Channel) -> Self
pub fn into_channel(self) -> Channel
Sourcepub fn wait_for_event(
&self,
deadline: MonotonicInstant,
) -> Result<FilterEvent, Error>
pub fn wait_for_event( &self, deadline: MonotonicInstant, ) -> Result<FilterEvent, Error>
Waits until an event arrives and returns it. It is safe for other threads to make concurrent requests while waiting for an event.
Sourcepub fn enable_interface(
&self,
id: u64,
___deadline: MonotonicInstant,
) -> Result<FilterEnableInterfaceResult, Error>
pub fn enable_interface( &self, id: u64, ___deadline: MonotonicInstant, ) -> Result<FilterEnableInterfaceResult, Error>
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,
___deadline: MonotonicInstant,
) -> Result<FilterDisableInterfaceResult, Error>
pub fn disable_interface( &self, id: u64, ___deadline: MonotonicInstant, ) -> Result<FilterDisableInterfaceResult, Error>
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,
___deadline: MonotonicInstant,
) -> Result<(Vec<Rule>, u32), Error>
pub fn get_rules( &self, ___deadline: MonotonicInstant, ) -> Result<(Vec<Rule>, u32), Error>
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,
___deadline: MonotonicInstant,
) -> Result<FilterUpdateRulesResult, Error>
pub fn update_rules( &self, rules: &[Rule], generation: u32, ___deadline: MonotonicInstant, ) -> Result<FilterUpdateRulesResult, Error>
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,
___deadline: MonotonicInstant,
) -> Result<(Vec<Nat>, u32), Error>
pub fn get_nat_rules( &self, ___deadline: MonotonicInstant, ) -> Result<(Vec<Nat>, u32), Error>
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,
___deadline: MonotonicInstant,
) -> Result<FilterUpdateNatRulesResult, Error>
pub fn update_nat_rules( &self, rules: &[Nat], generation: u32, ___deadline: MonotonicInstant, ) -> Result<FilterUpdateNatRulesResult, Error>
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,
___deadline: MonotonicInstant,
) -> Result<(Vec<Rdr>, u32), Error>
pub fn get_rdr_rules( &self, ___deadline: MonotonicInstant, ) -> Result<(Vec<Rdr>, u32), Error>
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,
___deadline: MonotonicInstant,
) -> Result<FilterUpdateRdrRulesResult, Error>
pub fn update_rdr_rules( &self, rules: &[Rdr], generation: u32, ___deadline: MonotonicInstant, ) -> Result<FilterUpdateRdrRulesResult, Error>
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, ___deadline: MonotonicInstant) -> Result<(), Error>
pub fn check_presence(&self, ___deadline: MonotonicInstant) -> Result<(), Error>
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 Debug for FilterSynchronousProxy
impl Debug for FilterSynchronousProxy
Source§impl SynchronousProxy for FilterSynchronousProxy
impl SynchronousProxy for FilterSynchronousProxy
Source§type Proxy = FilterProxy
type Proxy = FilterProxy
Source§type Protocol = FilterMarker
type Protocol = FilterMarker
Proxy
controls.