Skip to main content

FontQueue

Struct FontQueue 

Source
pub(super) struct FontQueue {
    pub pending: Vec<(String, String, bool, u8, bool)>,
    pub seen: BTreeSet<String>,
    pub active_workers: usize,
}
Expand description

取得待ちのフォント URL。

Fields§

§pending: Vec<(String, String, bool, u8, bool)>

(host, path, is_https, 優先度, まとめ取得を諦めた印)。

5 番目は「一度まとめ取得で失敗したので次は個別に取る」印。 これが無いと、失敗 → 積み直し → また同じ便にまとめられる → また失敗、の堂々巡りになる(実測でページが読めなくなった)。

§seen: BTreeSet<String>

取得済み・取得中の URL(重複投入を防ぐ)。R-4。

§active_workers: usize

【2026-08-04】稼働中のワーカースレッド数。

以前は thread_active: boolワーカーが 1 本だけだった。 5.3MB の Noto Sans JP を 1 本取っている間、同じキューの後続は 一切進まない。実測でギャラリー画像がフォント 21MB の後ろに 並んで実行時間内に届かなかった。

通信待ちの間はスケジューラへ譲るので、複数本走らせれば 重いリソースが他をブロックしなくなる

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.