pub struct EngineSynchronousProxy { /* private fields */ }
Implementations§
Source§impl EngineSynchronousProxy
impl EngineSynchronousProxy
pub fn new(channel: Channel) -> Self
pub fn into_channel(self) -> Channel
Sourcepub fn wait_for_event(
&self,
deadline: MonotonicInstant,
) -> Result<EngineEvent, Error>
pub fn wait_for_event( &self, deadline: MonotonicInstant, ) -> Result<EngineEvent, 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 start_edit_transaction(
&self,
transaction: ServerEnd<EditTransactionMarker>,
) -> Result<(), Error>
pub fn start_edit_transaction( &self, transaction: ServerEnd<EditTransactionMarker>, ) -> Result<(), Error>
Begins a rule edit transaction.
- request
transaction
a request for an [EditTransaction
].
Sourcepub fn list(&self, iterator: ServerEnd<RuleIteratorMarker>) -> Result<(), Error>
pub fn list(&self, iterator: ServerEnd<RuleIteratorMarker>) -> Result<(), Error>
Returns an iterator over all rewrite rules.
- request
iterator
a request for an iterator.
Sourcepub fn list_static(
&self,
iterator: ServerEnd<RuleIteratorMarker>,
) -> Result<(), Error>
pub fn list_static( &self, iterator: ServerEnd<RuleIteratorMarker>, ) -> Result<(), Error>
Returns an iterator over all static (immutable) rewrite rules. These
rules are handled as lower priority than dynamic rules and cannot be
modified (although they can be overridden) by [EditTransaction
]s.
- request
iterator
a request for an iterator.
Sourcepub fn test_apply(
&self,
url: &str,
___deadline: MonotonicInstant,
) -> Result<EngineTestApplyResult, Error>
pub fn test_apply( &self, url: &str, ___deadline: MonotonicInstant, ) -> Result<EngineTestApplyResult, Error>
Rewrites the given url
with the current rewrite rule set, returning the
rewritten
url. If no rules match or a rule matches but performs an
identity transformation, this API returns url
unchanged.
This API is intended only for reflecting on rule side effects. Using
this API to pre-apply the rules, then passing the result to
[fuchsia.pkg/PackageResolver.Resolve
] would apply the rules twice.
- request
url
the url to rewrite.
- response
rewritten
the rewritten url.
- 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
.
Trait Implementations§
Source§impl Debug for EngineSynchronousProxy
impl Debug for EngineSynchronousProxy
Source§impl SynchronousProxy for EngineSynchronousProxy
impl SynchronousProxy for EngineSynchronousProxy
Source§type Proxy = EngineProxy
type Proxy = EngineProxy
Source§type Protocol = EngineMarker
type Protocol = EngineMarker
Proxy
controls.