#[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§
source§impl CacheMissPolicy
impl CacheMissPolicy
pub fn from_primitive(prim: u32) -> Option<Self>
pub const fn into_primitive(self) -> u32
pub fn is_unknown(&self) -> bool
is_unknown
Trait Implementations§
source§impl Clone for CacheMissPolicy
impl Clone for CacheMissPolicy
source§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 moresource§impl Debug for CacheMissPolicy
impl Debug for CacheMissPolicy
source§impl Decode<CacheMissPolicy> for CacheMissPolicy
impl Decode<CacheMissPolicy> for CacheMissPolicy
source§impl Encode<CacheMissPolicy> for CacheMissPolicy
impl Encode<CacheMissPolicy> for CacheMissPolicy
source§impl Hash for CacheMissPolicy
impl Hash for CacheMissPolicy
source§impl Ord for CacheMissPolicy
impl Ord for CacheMissPolicy
source§fn cmp(&self, other: &CacheMissPolicy) -> Ordering
fn cmp(&self, other: &CacheMissPolicy) -> Ordering
1.21.0 · source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
source§impl PartialEq for CacheMissPolicy
impl PartialEq for CacheMissPolicy
source§fn eq(&self, other: &CacheMissPolicy) -> bool
fn eq(&self, other: &CacheMissPolicy) -> bool
self
and other
values to be equal, and is used
by ==
.source§impl PartialOrd for CacheMissPolicy
impl PartialOrd for CacheMissPolicy
source§fn partial_cmp(&self, other: &CacheMissPolicy) -> Option<Ordering>
fn partial_cmp(&self, other: &CacheMissPolicy) -> Option<Ordering>
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
self
and other
) and is used by the <=
operator. Read moresource§impl TypeMarker for CacheMissPolicy
impl TypeMarker for CacheMissPolicy
§type Owned = CacheMissPolicy
type Owned = CacheMissPolicy
source§fn inline_align(_context: Context) -> usize
fn inline_align(_context: Context) -> usize
source§fn inline_size(_context: Context) -> usize
fn inline_size(_context: Context) -> usize
inline_align
.source§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 moresource§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.source§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