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: Time) -> Result<EngineEvent, Error>
pub fn wait_for_event(&self, deadline: Time) -> 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: Time
) -> Result<EngineTestApplyResult, Error>
pub fn test_apply( &self, url: &str, ___deadline: Time ) -> 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
§type Proxy = EngineProxy
type Proxy = EngineProxy
§type Protocol = EngineMarker
type Protocol = EngineMarker
Proxy
controls.