mirror of
https://github.com/YGGverse/Yoda.git
synced 2026-04-01 17:15:28 +00:00
reorganize client Request
This commit is contained in:
parent
9d690d3137
commit
4665a7ff6a
9 changed files with 164 additions and 115 deletions
28
src/app/browser/window/tab/item/page/client/request.rs
Normal file
28
src/app/browser/window/tab/item/page/client/request.rs
Normal file
|
|
@ -0,0 +1,28 @@
|
|||
pub mod feature;
|
||||
pub use feature::Feature;
|
||||
|
||||
use gtk::{gio::Cancellable, glib::Priority};
|
||||
|
||||
/// Request data wrapper for `Client`
|
||||
pub struct Request {
|
||||
pub feature: Feature,
|
||||
/// Requests chain in order to process redirection rules
|
||||
pub referrer: Vec<Request>,
|
||||
}
|
||||
|
||||
impl Request {
|
||||
// Constructors
|
||||
|
||||
/// Build new `Self`
|
||||
pub fn build(
|
||||
query: &str,
|
||||
referrer: Option<Vec<Request>>,
|
||||
cancellable: Cancellable,
|
||||
priority: Priority,
|
||||
) -> Self {
|
||||
Self {
|
||||
feature: Feature::build(query, cancellable, priority),
|
||||
referrer: referrer.unwrap_or_default(),
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue