Enum CacheMissPolicy
#[repr(u32)]pub enum CacheMissPolicy {
BlockUntilDownloaded = 1,
ReturnEmptyResponse = 2,
ReturnFallback = 3,
}
Expand description
Options for what the font server should do if the client requests a typeface that is not yet cached.
Variants§
BlockUntilDownloaded = 1
The server will attempt to load the uncached typeface before providing a response. This is the default behavior.
This option is not recommended for synchronous clients that block rendering while waiting for a font.
ReturnEmptyResponse = 2
The server will tell the client that the uncached typeface is unavailable, by returning an
empty [fuchsia.fonts/TypefaceResponse
]. The uncached typeface may be downloaded
asynchronously to be available for future requests.
This is similar to font-display: block
in CSS.
ReturnFallback = 3
The server will attempt to provide a cached fallback typeface (if allowed by the fallback
restrictions in [fuchsia.fonts/TypefaceRequestFlags
]). The uncached typeface may be
downloaded asynchronously to be available for future requests.
This is similar to font-display: swap
in CSS.
Implementations§
§impl CacheMissPolicy
impl CacheMissPolicy
pub fn from_primitive(prim: u32) -> Option<CacheMissPolicy>
pub const fn into_primitive(self) -> u32
pub fn is_unknown(&self) -> bool
is_unknown
Trait Implementations§
§impl Clone for CacheMissPolicy
impl Clone for CacheMissPolicy
§fn clone(&self) -> CacheMissPolicy
fn clone(&self) -> CacheMissPolicy
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more§impl Debug for CacheMissPolicy
impl Debug for CacheMissPolicy
§impl<D> Decode<CacheMissPolicy, D> for CacheMissPolicywhere
D: ResourceDialect,
impl<D> Decode<CacheMissPolicy, D> for CacheMissPolicywhere
D: ResourceDialect,
§fn new_empty() -> CacheMissPolicy
fn new_empty() -> CacheMissPolicy
Self
. The specific value does not matter,
since it will be overwritten by decode
.§impl<D> Encode<CacheMissPolicy, D> for CacheMissPolicywhere
D: ResourceDialect,
impl<D> Encode<CacheMissPolicy, D> for CacheMissPolicywhere
D: ResourceDialect,
§impl Hash for CacheMissPolicy
impl Hash for CacheMissPolicy
§impl Ord for CacheMissPolicy
impl Ord for CacheMissPolicy
§impl PartialEq for CacheMissPolicy
impl PartialEq for CacheMissPolicy
§impl PartialOrd for CacheMissPolicy
impl PartialOrd for CacheMissPolicy
§impl TypeMarker for CacheMissPolicy
impl TypeMarker for CacheMissPolicy
§type Owned = CacheMissPolicy
type Owned = CacheMissPolicy
§fn inline_align(_context: Context) -> usize
fn inline_align(_context: Context) -> usize
§fn inline_size(_context: Context) -> usize
fn inline_size(_context: Context) -> usize
inline_align
.§fn encode_is_copy() -> bool
fn encode_is_copy() -> bool
Self::Owned
matches the FIDL wire
format and encoding requires no validation. When true, we can optimize
encoding arrays and vectors of Self::Owned
to a single memcpy. Read more§fn decode_is_copy() -> bool
fn decode_is_copy() -> bool
Self::Owned
matches the FIDL wire
format and decoding requires no validation. When true, we can optimize
decoding arrays and vectors of Self::Owned
to a single memcpy.§impl ValueTypeMarker for CacheMissPolicy
impl ValueTypeMarker for CacheMissPolicy
§type Borrowed<'a> = CacheMissPolicy
type Borrowed<'a> = CacheMissPolicy
Encode<Self>
type cheaply obtainable from &Self::Owned
. There are three cases: Read more§fn borrow(
value: &<CacheMissPolicy as TypeMarker>::Owned,
) -> <CacheMissPolicy as ValueTypeMarker>::Borrowed<'_>
fn borrow( value: &<CacheMissPolicy as TypeMarker>::Owned, ) -> <CacheMissPolicy as ValueTypeMarker>::Borrowed<'_>
&Self::Owned
to Self::Borrowed
.