struct NoSite;Expand description
何もしない既定の実装。
Trait Implementations§
Source§impl SiteHooks for NoSite
impl SiteHooks for NoSite
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,
_host: &str,
_path: &str,
_is_https: bool,
_is_post: bool,
_post_body: &str,
) -> Option<String>
fn offline_page( &self, _host: &str, _path: &str, _is_https: bool, _is_post: bool, _post_body: &str, ) -> Option<String>
リンクが下がっているときの代わりのページ。
Source§fn rewrite_response(
&self,
_host: &str,
_path: &str,
_is_https: bool,
body: String,
) -> String
fn rewrite_response( &self, _host: &str, _path: &str, _is_https: bool, body: String, ) -> String
受け取った本文を整える(検索結果ページの再生成など)。対象外なら本文をそのまま返す。
Source§fn load_failed_page(
&self,
_host: &str,
_path: &str,
_is_https: bool,
_err: &str,
) -> Option<String>
fn load_failed_page( &self, _host: &str, _path: &str, _is_https: bool, _err: &str, ) -> Option<String>
取得に失敗したときの代わりのページ。
Source§fn patch_script(&self, _url: &str, _text: &mut String)
fn patch_script(&self, _url: &str, _text: &mut String)
スクリプトの本文を取り込むときの差し替え(対象の URL だけ。
web_engine/layout.rs)。Source§fn load_settle_ms(&self, _host: &str) -> Option<u64>
fn load_settle_ms(&self, _host: &str) -> Option<u64>
ページの背景の既定を暗くするホストか。
文書を complete にする(
load を出す)前に、取得も DOM の変化も無い状態がこの時間(ms)続くのを待つサイト。
既定は None(仕様どおり、副資源の取得が済んだら出す。HTML §8.1.7)。fn is_dark_host(&self, _host: &str) -> bool
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)
1 フレームごとの呼び出し(診断の記録)。
js は JsRuntime(このモジュールが JS の型を知らなくて済むよう Any で渡す)。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 NoSite
impl RefUnwindSafe for NoSite
impl Send for NoSite
impl Sync for NoSite
impl Unpin for NoSite
impl UnsafeUnpin for NoSite
impl UnwindSafe for NoSite
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