pub struct FilterProxy { /* private fields */ }Implementations§
Source§impl FilterProxy
impl FilterProxy
Sourcepub fn new(channel: Channel) -> Self
pub fn new(channel: Channel) -> 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, FDomainResourceDialect>
pub fn enable_interface( &self, id: u64, ) -> QueryResponseFut<FilterEnableInterfaceResult, FDomainResourceDialect>
Enable the filter on a specific interface.
The filter is disabled by default. If the filter is already enabled, no error is returned.
- request
idThe id of the network interface.
- error Reports
NOT_FOUNDifidis not a valid interface.
Sourcepub fn disable_interface(
&self,
id: u64,
) -> QueryResponseFut<FilterDisableInterfaceResult, FDomainResourceDialect>
pub fn disable_interface( &self, id: u64, ) -> QueryResponseFut<FilterDisableInterfaceResult, FDomainResourceDialect>
Disable the filter on a specific interface.
The filter is disabled by default. If the filter is already disabled, no error is returned.
- request
idThe id of the network interface.
- error Reports
NOT_FOUNDifidis not a valid interface.
Sourcepub fn get_rules(
&self,
) -> QueryResponseFut<(Vec<Rule>, u32), FDomainResourceDialect>
pub fn get_rules( &self, ) -> QueryResponseFut<(Vec<Rule>, u32), FDomainResourceDialect>
GetRules gets the current rules. They do not include NAT or RDR rules. (use GetNatRules or GetRdrRules instead).
- response
rulesThe current filter rules. - response
generationThe generation number associated with the current rules.
Sourcepub fn update_rules(
&self,
rules: &[Rule],
generation: u32,
) -> QueryResponseFut<FilterUpdateRulesResult, FDomainResourceDialect>
pub fn update_rules( &self, rules: &[Rule], generation: u32, ) -> QueryResponseFut<FilterUpdateRulesResult, FDomainResourceDialect>
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
rulesThe new filter rules to install. - request
generationThe generation number previously returned from GetRules.
- error Reports
GENERATION_MISMATCHifgenerationis not the generation number for the current rules. - error Reports
BAD_RULEifrulesare not valid.
Sourcepub fn get_nat_rules(
&self,
) -> QueryResponseFut<(Vec<Nat>, u32), FDomainResourceDialect>
pub fn get_nat_rules( &self, ) -> QueryResponseFut<(Vec<Nat>, u32), FDomainResourceDialect>
GetNatRules gets the current NAT rules.
- response
rulesThe current NAT rules. - response
generationThe generation number associated with the current NAT rules.
Sourcepub fn update_nat_rules(
&self,
rules: &[Nat],
generation: u32,
) -> QueryResponseFut<FilterUpdateNatRulesResult, FDomainResourceDialect>
pub fn update_nat_rules( &self, rules: &[Nat], generation: u32, ) -> QueryResponseFut<FilterUpdateNatRulesResult, FDomainResourceDialect>
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
rulesThe new NAT rules to install. - request
generationThe generation number previously returned from GetNATRules.
- error Reports
GENERATION_MISMATCHifgenerationis not the generation number for the current rules. - error Reports
BAD_RULEifrulesare not valid.
Sourcepub fn get_rdr_rules(
&self,
) -> QueryResponseFut<(Vec<Rdr>, u32), FDomainResourceDialect>
pub fn get_rdr_rules( &self, ) -> QueryResponseFut<(Vec<Rdr>, u32), FDomainResourceDialect>
GetRdrRules gets the current RDR rules.
- response
rulesThe current RDR rules. - response
generationThe generation number associated with the current RDR rules.
Sourcepub fn update_rdr_rules(
&self,
rules: &[Rdr],
generation: u32,
) -> QueryResponseFut<FilterUpdateRdrRulesResult, FDomainResourceDialect>
pub fn update_rdr_rules( &self, rules: &[Rdr], generation: u32, ) -> QueryResponseFut<FilterUpdateRdrRulesResult, FDomainResourceDialect>
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
rulesThe new RDR rules to install. - request
generationThe generation number previously returned from GetRDRRules.
- error Reports
NOT_SUPPORTEDif the operation is not supported.
Sourcepub fn check_presence(&self) -> QueryResponseFut<(), FDomainResourceDialect>
pub fn check_presence(&self) -> QueryResponseFut<(), FDomainResourceDialect>
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 (const: unstable) · 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>, FDomainResourceDialect>
type DisableInterfaceResponseFut = QueryResponseFut<Result<(), EnableDisableInterfaceError>, FDomainResourceDialect>
type GetRulesResponseFut = QueryResponseFut<(Vec<Rule>, u32), FDomainResourceDialect>
type UpdateRulesResponseFut = QueryResponseFut<Result<(), FilterUpdateRulesError>, FDomainResourceDialect>
type GetNatRulesResponseFut = QueryResponseFut<(Vec<Nat>, u32), FDomainResourceDialect>
type UpdateNatRulesResponseFut = QueryResponseFut<Result<(), FilterUpdateNatRulesError>, FDomainResourceDialect>
type GetRdrRulesResponseFut = QueryResponseFut<(Vec<Rdr>, u32), FDomainResourceDialect>
type UpdateRdrRulesResponseFut = QueryResponseFut<Result<(), FilterUpdateRdrRulesError>, FDomainResourceDialect>
type CheckPresenceResponseFut = QueryResponseFut<(), FDomainResourceDialect>
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: Channel) -> Self
fn from_channel(inner: Channel) -> Self
Source§fn into_channel(self) -> Result<Channel, Self>
fn into_channel(self) -> Result<Channel, Self>
Source§fn as_channel(&self) -> &Channel
fn as_channel(&self) -> &Channel
Source§fn into_client_end(self) -> Result<ClientEnd<Self::Protocol>, Self>
fn into_client_end(self) -> Result<ClientEnd<Self::Protocol>, Self>
Source§fn domain(&self) -> Arc<Client>
fn domain(&self) -> Arc<Client>
Source§fn on_closed(&self) -> OnFDomainSignals
fn on_closed(&self) -> OnFDomainSignals
PEER_CLOSED signal.Auto Trait Implementations§
impl Freeze for FilterProxy
impl !RefUnwindSafe for FilterProxy
impl Send for FilterProxy
impl Sync for FilterProxy
impl Unpin for FilterProxy
impl UnsafeUnpin 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§impl<T, D> Encode<Ambiguous1, D> for Twhere
D: ResourceDialect,
impl<T, D> Encode<Ambiguous1, D> for Twhere
D: ResourceDialect,
Source§impl<T, D> Encode<Ambiguous2, D> for Twhere
D: ResourceDialect,
impl<T, D> Encode<Ambiguous2, D> for Twhere
D: ResourceDialect,
§impl<T> InstanceFromServiceTransport<T> for T
impl<T> InstanceFromServiceTransport<T> for T
§fn from_service_transport(handle: T) -> T
fn from_service_transport(handle: T) -> T
T to [Self]