pub enum ProviderRequest {
GetTypefaceById {
id: u32,
responder: ProviderGetTypefaceByIdResponder,
},
ListTypefaces {
request: ListTypefacesRequest,
iterator: ServerEnd<ListTypefacesIteratorMarker>,
responder: ProviderListTypefacesResponder,
},
GetTypefacesByFamily {
family: FamilyName,
responder: ProviderGetTypefacesByFamilyResponder,
},
}Expand description
Experimental additions to Provider.
Variants§
GetTypefaceById
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.
ListTypefaces
Creates a ListTypefacesIterator instance that will return a paginated
list of fonts matching request.
Possible errors:
INTERNAL if something bad happens.
Fields
request: ListTypefacesRequestiterator: ServerEnd<ListTypefacesIteratorMarker>responder: ProviderListTypefacesResponderGetTypefacesByFamily
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.
Implementations§
Source§impl ProviderRequest
impl ProviderRequest
pub fn into_get_typeface_by_id( self, ) -> Option<(u32, ProviderGetTypefaceByIdResponder)>
pub fn into_list_typefaces( self, ) -> Option<(ListTypefacesRequest, ServerEnd<ListTypefacesIteratorMarker>, ProviderListTypefacesResponder)>
pub fn into_get_typefaces_by_family( self, ) -> Option<(FamilyName, ProviderGetTypefacesByFamilyResponder)>
Sourcepub fn method_name(&self) -> &'static str
pub fn method_name(&self) -> &'static str
Name of the method defined in FIDL