1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
/// Used to perform a cheap conversion to a [`Face`](struct.Face.html) reference.
pub trait AsFaceRef {
/// Convert to a [`Face`](struct.Face.html) reference.
fn as_face_ref(&self) -> &ttf_parser::Face<'_>;
}
impl AsFaceRef for ttf_parser::Face<'_> {
#[inline]
fn as_face_ref(&self) -> &ttf_parser::Face<'_> {
self
}
}
impl AsFaceRef for &ttf_parser::Face<'_> {
#[inline]
fn as_face_ref(&self) -> &ttf_parser::Face<'_> {
self
}
}