pub struct Query<'a> { /* private fields */ }Expand description
State for font selection.
Instances of this can be obtained from Collection::query.
Implementations§
Source§impl<'a> Query<'a>
impl<'a> Query<'a>
Sourcepub fn set_families<'f, I>(&mut self, families: I)
pub fn set_families<'f, I>(&mut self, families: I)
Sets the ordered sequence of families to match against.
Sourcepub fn set_attributes(&mut self, attributes: Attributes)
pub fn set_attributes(&mut self, attributes: Attributes)
Sets the primary attributes to match against.
Sourcepub fn set_fallbacks(&mut self, key: impl Into<FallbackKey>)
pub fn set_fallbacks(&mut self, key: impl Into<FallbackKey>)
Sets the script and locale for fallback fonts.
Sourcepub fn matches_with(&mut self, f: impl FnMut(&QueryFont) -> QueryStatus)
pub fn matches_with(&mut self, f: impl FnMut(&QueryFont) -> QueryStatus)
Invokes the given callback with all fonts that match the current settings.
Return QueryStatus::Stop to end iterating over the matching
fonts or QueryStatus::Continue to continue iterating.
Trait Implementations§
Auto Trait Implementations§
impl<'a> Freeze for Query<'a>
impl<'a> !RefUnwindSafe for Query<'a>
impl<'a> Send for Query<'a>
impl<'a> Sync for Query<'a>
impl<'a> Unpin for Query<'a>
impl<'a> UnsafeUnpin for Query<'a>
impl<'a> !UnwindSafe for Query<'a>
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
Mutably borrows from an owned value. Read more