pub struct ProviderProxy { /* private fields */ }
Implementations§
Source§impl ProviderProxy
impl ProviderProxy
Sourcepub fn new(channel: AsyncChannel) -> Self
pub fn new(channel: AsyncChannel) -> Self
Create a new Proxy for fuchsia.fonts.experimental/Provider.
Sourcepub fn take_event_stream(&self) -> ProviderEventStream
pub fn take_event_stream(&self) -> ProviderEventStream
Get a Stream of events from the remote end of the protocol.
§Panics
Panics if the event stream was already taken.
Sourcepub fn get_typeface_by_id(
&self,
id: u32,
) -> QueryResponseFut<ProviderGetTypefaceByIdResult, DefaultFuchsiaResourceDialect>
pub fn get_typeface_by_id( &self, id: u32, ) -> QueryResponseFut<ProviderGetTypefaceByIdResult, DefaultFuchsiaResourceDialect>
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>,
) -> QueryResponseFut<ProviderListTypefacesResult, DefaultFuchsiaResourceDialect>
pub fn list_typefaces( &self, request: &ListTypefacesRequest, iterator: ServerEnd<ListTypefacesIteratorMarker>, ) -> QueryResponseFut<ProviderListTypefacesResult, DefaultFuchsiaResourceDialect>
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,
) -> QueryResponseFut<ProviderGetTypefacesByFamilyResult, DefaultFuchsiaResourceDialect>
pub fn get_typefaces_by_family( &self, family: &FamilyName, ) -> QueryResponseFut<ProviderGetTypefacesByFamilyResult, DefaultFuchsiaResourceDialect>
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 Clone for ProviderProxy
impl Clone for ProviderProxy
Source§fn clone(&self) -> ProviderProxy
fn clone(&self) -> ProviderProxy
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreSource§impl Debug for ProviderProxy
impl Debug for ProviderProxy
Source§impl ProviderProxyInterface for ProviderProxy
impl ProviderProxyInterface for ProviderProxy
type GetTypefaceByIdResponseFut = QueryResponseFut<Result<TypefaceResponse, Error>>
type ListTypefacesResponseFut = QueryResponseFut<Result<(), Error>>
type GetTypefacesByFamilyResponseFut = QueryResponseFut<Result<TypefaceInfoResponse, Error>>
fn get_typeface_by_id(&self, id: u32) -> Self::GetTypefaceByIdResponseFut
fn list_typefaces( &self, request: &ListTypefacesRequest, iterator: ServerEnd<ListTypefacesIteratorMarker>, ) -> Self::ListTypefacesResponseFut
fn get_typefaces_by_family( &self, family: &FamilyName, ) -> Self::GetTypefacesByFamilyResponseFut
Source§impl Proxy for ProviderProxy
impl Proxy for ProviderProxy
Source§type Protocol = ProviderMarker
type Protocol = ProviderMarker
Proxy
controls.Source§fn from_channel(inner: AsyncChannel) -> Self
fn from_channel(inner: AsyncChannel) -> Self
Source§fn into_channel(self) -> Result<AsyncChannel, Self>
fn into_channel(self) -> Result<AsyncChannel, Self>
Source§fn as_channel(&self) -> &AsyncChannel
fn as_channel(&self) -> &AsyncChannel
§fn into_client_end(self) -> Result<ClientEnd<Self::Protocol>, Self>
fn into_client_end(self) -> Result<ClientEnd<Self::Protocol>, Self>
Auto Trait Implementations§
impl Freeze for ProviderProxy
impl !RefUnwindSafe for ProviderProxy
impl Send for ProviderProxy
impl Sync for ProviderProxy
impl Unpin for ProviderProxy
impl !UnwindSafe for ProviderProxy
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)