#[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<D: ResourceDialect> Decode<CacheMissPolicy, D> for CacheMissPolicy
impl<D: ResourceDialect> Decode<CacheMissPolicy, D> for CacheMissPolicy
Source§impl<D: ResourceDialect> Encode<CacheMissPolicy, D> for CacheMissPolicy
impl<D: ResourceDialect> Encode<CacheMissPolicy, D> 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§impl PartialOrd for CacheMissPolicy
impl PartialOrd for CacheMissPolicy
Source§impl TypeMarker for CacheMissPolicy
impl TypeMarker for CacheMissPolicy
Source§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
Source§type Borrowed<'a> = CacheMissPolicy
type Borrowed<'a> = CacheMissPolicy
Encode<Self>
type cheaply obtainable from &Self::Owned
. There are three cases: Read moreimpl Copy for CacheMissPolicy
impl Eq for CacheMissPolicy
impl StructuralPartialEq for CacheMissPolicy
Auto Trait Implementations§
impl Freeze for CacheMissPolicy
impl RefUnwindSafe for CacheMissPolicy
impl Send for CacheMissPolicy
impl Sync for CacheMissPolicy
impl Unpin for CacheMissPolicy
impl UnwindSafe for CacheMissPolicy
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
)