pub struct UrlContentResolver {
pub basic_auth_extractor: Option<BasicAuthExtractor>,
pub headers: HeaderMap,
pub client: Client,
}Expand description
Structure to fetch remote content.
Fields§
§basic_auth_extractor: Option<BasicAuthExtractor>§headers: HeaderMap§client: ClientImplementations§
Source§impl UrlContentResolver
impl UrlContentResolver
Sourcepub async fn url_contents(&self, url: Url) -> Result<InputContent>
pub async fn url_contents(&self, url: Url) -> Result<InputContent>
Fetch remote content by URL.
This method is not intended to check if a URL is functional but to get a URL’s content and process the content.
fn build_request( &self, url: &Url, credentials: Option<BasicAuthCredentials>, ) -> Result<Request>
Trait Implementations§
Source§impl Clone for UrlContentResolver
impl Clone for UrlContentResolver
Source§fn clone(&self) -> UrlContentResolver
fn clone(&self) -> UrlContentResolver
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for UrlContentResolver
impl Debug for UrlContentResolver
Source§impl Default for UrlContentResolver
impl Default for UrlContentResolver
Source§fn default() -> UrlContentResolver
fn default() -> UrlContentResolver
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for UrlContentResolver
impl !RefUnwindSafe for UrlContentResolver
impl Send for UrlContentResolver
impl Sync for UrlContentResolver
impl Unpin for UrlContentResolver
impl UnsafeUnpin for UrlContentResolver
impl !UnwindSafe for UrlContentResolver
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more