pub struct LegacySites;Expand description
既定の(これまでと同じ)サイト別の対応。
Trait Implementations§
Source§impl SiteHooks for LegacySites
impl SiteHooks for LegacySites
Source§fn load_settle_ms(&self, host: &str) -> Option<u64>
fn load_settle_ms(&self, host: &str) -> Option<u64>
YouTube は complete で部品を接続するので、アプリが組み上がる(DOM の節点数が 3 秒変わらない)まで待つ。 【2026-10-23】1 秒では視聴ページ(ytd-watch-flexy の中身)が組み上がる前に complete になり、 後から入った部品(ytd-watch-metadata 等)が接続されなかった。【2026-11-28】エンジンの共通処理からここへ移した。
Source§fn page_tick(&self, url_with_hash: &str, frame_depth: u32, js: &mut dyn Any)
fn page_tick(&self, url_with_hash: &str, frame_depth: u32, js: &mut dyn Any)
【2026-11-03 診断】YouTube の証明(PO トークン)の準備がどこまで進んだかを 15 秒ごとに記録する。
ページの inline スクリプトの ytAtP/ytAtN → kevlar の ytAtRC → BotGuard(trayride)→
bevasrsg.bevasrs(player が待つ)の順に進む。読むだけで値は変えない(TODO B0)。
Source§fn fetch_is_special(&self, method: &str, full_url: &str) -> bool
fn fetch_is_special(&self, method: &str, full_url: &str) -> bool
この要求は、要求・応答に手を入れる対象か(YouTube の SABR: googlevideo への POST)。
Source§fn fetch_rewrite_request(
&self,
url: &str,
body: &[u8],
) -> (String, Option<Vec<u8>>)
fn fetch_rewrite_request( &self, url: &str, body: &[u8], ) -> (String, Option<Vec<u8>>)
対象の要求の URL と本文を整える。
(使う URL, 差し替えた本文)。本文を変えなければ None。Source§fn fetch_on_response(&self, raw: &mut Vec<u8>)
fn fetch_on_response(&self, raw: &mut Vec<u8>)
対象の要求の応答を見る(記録・警告)。
Source§fn user_agent(&self, host: &str) -> Option<&'static str>
fn user_agent(&self, host: &str) -> Option<&'static str>
このホストへの既定の User-Agent(
None なら既定の AtmOS/1.0)。Source§fn offline_page(
&self,
current_host: &str,
current_path: &str,
current_is_https: bool,
is_post: bool,
post_body: &str,
) -> Option<String>
fn offline_page( &self, current_host: &str, current_path: &str, current_is_https: bool, is_post: bool, post_body: &str, ) -> Option<String>
リンクが下がっているときの代わりのページ。
Source§fn rewrite_response(
&self,
current_host: &str,
current_path: &str,
current_is_https: bool,
body: String,
) -> String
fn rewrite_response( &self, current_host: &str, current_path: &str, current_is_https: bool, body: String, ) -> String
受け取った本文を整える(検索結果ページの再生成など)。対象外なら本文をそのまま返す。
Source§fn load_failed_page(
&self,
current_host: &str,
current_path: &str,
current_is_https: bool,
e: &str,
) -> Option<String>
fn load_failed_page( &self, current_host: &str, current_path: &str, current_is_https: bool, e: &str, ) -> Option<String>
取得に失敗したときの代わりのページ。
Source§fn patch_script(&self, url: &str, s: &mut String)
fn patch_script(&self, url: &str, s: &mut String)
スクリプトの本文を取り込むときの差し替え(対象の URL だけ。
web_engine/layout.rs)。fn is_dark_host(&self, host: &str) -> bool
Source§fn initial_page(&self) -> (&'static str, &'static str)
fn initial_page(&self) -> (&'static str, &'static str)
ページを開く前の初期の表示
(ホスト, 題)。Source§fn resolve_redirect_link(&self, href: &str) -> Option<String>
fn resolve_redirect_link(&self, href: &str) -> Option<String>
リンク先が検索サイトの中継 URL なら、その先の URL(直接開く)。
Source§fn default_bookmarks(&self) -> Vec<(&'static str, &'static str)>
fn default_bookmarks(&self) -> Vec<(&'static str, &'static str)>
既定のブックマーク
(題, URL)(「AtmOS Home」の次に並べる)。Source§fn omnibox_prefix_suggestion(&self, q: &str) -> Option<(String, String)>
fn omnibox_prefix_suggestion(&self, q: &str) -> Option<(String, String)>
入力の先頭の語(
yt など)による直接の候補 (題, URL)。Source§fn search_suggestion_url(&self, s: &str) -> String
fn search_suggestion_url(&self, s: &str) -> String
Web 検索の候補を開く URL。
入力の近道(
g / yt など)。(ホスト, パス)(https で開く)。Source§fn default_search(&self, input: &str) -> Option<(String, String)>
fn default_search(&self, input: &str) -> Option<(String, String)>
入力が URL でも近道でもないときの既定の検索。
(ホスト, パス)(https で開く)。Source§fn media_stream_begin(&self)
fn media_stream_begin(&self)
MSE の再生を始める。
Source§fn media_stream_end(&self)
fn media_stream_end(&self)
MSE の再生を終える・止める。
Source§fn media_stream_playback_head(&self, ms: u64)
fn media_stream_playback_head(&self, ms: u64)
再生位置(ms)を伝える。
Source§fn media_stream_refill(&self, ms_id: usize) -> bool
fn media_stream_refill(&self, ms_id: usize) -> bool
足りなくなった媒体を取り足す。起こしたら真。
Auto Trait Implementations§
impl Freeze for LegacySites
impl RefUnwindSafe for LegacySites
impl Send for LegacySites
impl Sync for LegacySites
impl Unpin for LegacySites
impl UnsafeUnpin for LegacySites
impl UnwindSafe for LegacySites
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