pub struct FontResolverSynchronousProxy { /* private fields */ }
Implementations§
Source§impl FontResolverSynchronousProxy
impl FontResolverSynchronousProxy
pub fn new(channel: Channel) -> Self
pub fn into_channel(self) -> Channel
Sourcepub fn wait_for_event(
&self,
deadline: MonotonicInstant,
) -> Result<FontResolverEvent, Error>
pub fn wait_for_event( &self, deadline: MonotonicInstant, ) -> Result<FontResolverEvent, 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 resolve(
&self,
package_url: &str,
directory_request: ServerEnd<DirectoryMarker>,
___deadline: MonotonicInstant,
) -> Result<FontResolverResolveResult, Error>
pub fn resolve( &self, package_url: &str, directory_request: ServerEnd<DirectoryMarker>, ___deadline: MonotonicInstant, ) -> Result<FontResolverResolveResult, Error>
Populates or updates the cache of a font package, fetching it if it is not present on the local system.
- request
package_url
the package URL of a font package. - request
directory_request
a request for a directory that will be resolved when the package has been successfully cached. The directory should contain a single file, corresponding to the asset filename. The client should retain the directory handle for as long as needed to prevent the package from being evicted from cache.
- error a zx_status value indicating failure. One of the following:
ZX_ERR_ACCESS_DENIED
if the resolver does not have permission to fetch a package blob.ZX_ERR_IO
if there is some other unspecified error during I/O.ZX_ERR_NOT_FOUND
if the font package or a package blob does not exist, or is not known to be a font package.ZX_ERR_NO_SPACE
if there is no space available to store the package.ZX_ERR_UNAVAILABLE
if the resolver is currently unable to fetch a package blob.
Trait Implementations§
Source§impl Debug for FontResolverSynchronousProxy
impl Debug for FontResolverSynchronousProxy
Source§impl SynchronousProxy for FontResolverSynchronousProxy
impl SynchronousProxy for FontResolverSynchronousProxy
Source§type Proxy = FontResolverProxy
type Proxy = FontResolverProxy
The async proxy for the same protocol.
Source§type Protocol = FontResolverMarker
type Protocol = FontResolverMarker
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 FontResolverSynchronousProxy
impl RefUnwindSafe for FontResolverSynchronousProxy
impl Send for FontResolverSynchronousProxy
impl Sync for FontResolverSynchronousProxy
impl Unpin for FontResolverSynchronousProxy
impl UnwindSafe for FontResolverSynchronousProxy
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