pub struct EditTransactionSynchronousProxy { /* private fields */ }
Implementations§
Source§impl EditTransactionSynchronousProxy
impl EditTransactionSynchronousProxy
pub fn new(channel: Channel) -> Self
pub fn into_channel(self) -> Channel
Sourcepub fn wait_for_event(
&self,
deadline: MonotonicInstant,
) -> Result<EditTransactionEvent, Error>
pub fn wait_for_event( &self, deadline: MonotonicInstant, ) -> Result<EditTransactionEvent, 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 list_dynamic(
&self,
iterator: ServerEnd<RuleIteratorMarker>,
) -> Result<(), Error>
pub fn list_dynamic( &self, iterator: ServerEnd<RuleIteratorMarker>, ) -> Result<(), Error>
Returns an iterator over all dynamic (editable) rewrite rules. The iterator will reflect any changes made to the rewrite rules so far in this transaction.
- request
iterator
a request for an iterator.
Sourcepub fn reset_all(&self) -> Result<(), Error>
pub fn reset_all(&self) -> Result<(), Error>
Removes all dynamically configured rewrite rules, leaving only any statically configured rules.
Sourcepub fn add(
&self,
rule: &Rule,
___deadline: MonotonicInstant,
) -> Result<EditTransactionAddResult, Error>
pub fn add( &self, rule: &Rule, ___deadline: MonotonicInstant, ) -> Result<EditTransactionAddResult, Error>
Adds a rewrite rule with highest priority. If rule
already exists, this
API will prioritize it over other rules.
- request
rule
the rewrite rule to persist.
- error a zx_status value indicating failure. One of the following:
ZX_ERR_INVALID_ARGS
ifurl
is not a validfuchsia-pkg://
URL. Seefuchsia-pkg URL
.
Sourcepub fn commit(
&self,
___deadline: MonotonicInstant,
) -> Result<EditTransactionCommitResult, Error>
pub fn commit( &self, ___deadline: MonotonicInstant, ) -> Result<EditTransactionCommitResult, Error>
Commits this transaction, or detect another transaction that committed before this one.
- error a zx_status value indicating failure. One of the following:
ZX_ERR_UNAVAILABLE
if another transaction committed before this one.ZX_ERR_ACCESS_DENIED
if editing dynamic rewrite rules is permanently disabled.
Trait Implementations§
Source§impl SynchronousProxy for EditTransactionSynchronousProxy
impl SynchronousProxy for EditTransactionSynchronousProxy
Source§type Proxy = EditTransactionProxy
type Proxy = EditTransactionProxy
The async proxy for the same protocol.
Source§type Protocol = EditTransactionMarker
type Protocol = EditTransactionMarker
The protocol which this
Proxy
controls.Source§fn from_channel(inner: Channel) -> Self
fn from_channel(inner: Channel) -> Self
Create a proxy over the given channel.
Source§fn into_channel(self) -> Channel
fn into_channel(self) -> Channel
Convert the proxy back into a channel.
Source§fn as_channel(&self) -> &Channel
fn as_channel(&self) -> &Channel
Get a reference to the proxy’s underlying channel. Read more
Auto Trait Implementations§
impl Freeze for EditTransactionSynchronousProxy
impl RefUnwindSafe for EditTransactionSynchronousProxy
impl Send for EditTransactionSynchronousProxy
impl Sync for EditTransactionSynchronousProxy
impl Unpin for EditTransactionSynchronousProxy
impl UnwindSafe for EditTransactionSynchronousProxy
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