pub struct ProviderSynchronousProxy { /* private fields */ }
Implementations§
Source§impl ProviderSynchronousProxy
impl ProviderSynchronousProxy
pub fn new(channel: Channel) -> Self
pub fn into_channel(self) -> Channel
Sourcepub fn wait_for_event(
&self,
deadline: MonotonicInstant,
) -> Result<ProviderEvent, Error>
pub fn wait_for_event( &self, deadline: MonotonicInstant, ) -> Result<ProviderEvent, 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 get_typeface_by_id(
&self,
id: u32,
___deadline: MonotonicInstant,
) -> Result<ProviderGetTypefaceByIdResult, Error>
pub fn get_typeface_by_id( &self, id: u32, ___deadline: MonotonicInstant, ) -> Result<ProviderGetTypefaceByIdResult, Error>
Get an exact font by asset ID. This would typically be called
after ListTypefaces
, e.g. as part of a font selection interface.
As with fuchsia.fonts.GetTypeface
, it is the caller’s responsibility
to properly parse the file.
Possible errors:
NOT_FOUND
if no asset with the requested id
exists.
INTERNAL
if the requested id
exists, but the asset failed to load.
Eventually this should probably be folded into GetTypeface
.
Sourcepub fn list_typefaces(
&self,
request: &ListTypefacesRequest,
iterator: ServerEnd<ListTypefacesIteratorMarker>,
___deadline: MonotonicInstant,
) -> Result<ProviderListTypefacesResult, Error>
pub fn list_typefaces( &self, request: &ListTypefacesRequest, iterator: ServerEnd<ListTypefacesIteratorMarker>, ___deadline: MonotonicInstant, ) -> Result<ProviderListTypefacesResult, Error>
Creates a ListTypefacesIterator
instance that will return a paginated
list of fonts matching request
.
Possible errors:
INTERNAL
if something bad happens.
Sourcepub fn get_typefaces_by_family(
&self,
family: &FamilyName,
___deadline: MonotonicInstant,
) -> Result<ProviderGetTypefacesByFamilyResult, Error>
pub fn get_typefaces_by_family( &self, family: &FamilyName, ___deadline: MonotonicInstant, ) -> Result<ProviderGetTypefacesByFamilyResult, Error>
Returns a TypefaceInfo
for each font in the requested family
. The
results’ family
fields will hold the canonical family name, even if
this method is called with an alias.
This method should be called only if the caller knows family
exists.
Requesting a family that does not exist results in an error. To search
for fonts by family name (or alias), use ListTypefaces
instead.
Possible errors:
NOT_FOUND
if no family name or alias matches the requested family
.
Trait Implementations§
Source§impl Debug for ProviderSynchronousProxy
impl Debug for ProviderSynchronousProxy
Source§impl SynchronousProxy for ProviderSynchronousProxy
impl SynchronousProxy for ProviderSynchronousProxy
Source§type Proxy = ProviderProxy
type Proxy = ProviderProxy
Source§type Protocol = ProviderMarker
type Protocol = ProviderMarker
Proxy
controls.