pub struct FetchRequest { /* private fields */ }Expand description
Bounded provider-neutral request passed to a client fetch backend.
Implementations§
Source§impl FetchRequest
impl FetchRequest
Sourcepub fn new(
url: impl Into<String>,
max_chars: usize,
) -> Result<Self, FetchRequestError>
pub fn new( url: impl Into<String>, max_chars: usize, ) -> Result<Self, FetchRequestError>
Creates and validates a fetch request.
DNS, IP-range checks, and per-hop connection authorization still belong to the HTTP transport. This constructor freezes the production URL syntax and scheme contract before the request reaches a provider.
§Errors
Rejects non-HTTPS URLs, credentials, unsafe ports, controls, and character
limits outside 1..=100_000. Fragments are removed from the canonical URL.
Sourcepub fn new_with_policy(
url: impl Into<String>,
max_chars: usize,
policy: &FetchUrlPolicy,
) -> Result<Self, FetchRequestError>
pub fn new_with_policy( url: impl Into<String>, max_chars: usize, policy: &FetchUrlPolicy, ) -> Result<Self, FetchRequestError>
Trait Implementations§
Source§impl Clone for FetchRequest
impl Clone for FetchRequest
Source§impl Debug for FetchRequest
impl Debug for FetchRequest
impl Eq for FetchRequest
Source§impl PartialEq for FetchRequest
impl PartialEq for FetchRequest
impl StructuralPartialEq for FetchRequest
Auto Trait Implementations§
impl Freeze for FetchRequest
impl RefUnwindSafe for FetchRequest
impl Send for FetchRequest
impl Sync for FetchRequest
impl Unpin for FetchRequest
impl UnsafeUnpin for FetchRequest
impl UnwindSafe for FetchRequest
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.