pub struct HttpRequest {
pub client: Client,
pub request: String,
pub headers: HeaderMap,
pub content_length: Option<u64>,
}
Expand description
A lazily instantiated HTTP request.
Fields§
§client: Client
A reqwest client instance used to send the HTTP GET request.
request: String
The target URL of the required resource.
headers: HeaderMap
HTTP header fields to add to any created requests.
content_length: Option<u64>
Content length, used as an upper bound in range requests if known.
This is only needed for certain domains who expect to see a value like
range: bytes=0-1023
instead of the simpler range: bytes=0-
(such as
Youtube).
Implementations§
Source§impl HttpRequest
impl HttpRequest
Trait Implementations§
Source§impl Clone for HttpRequest
impl Clone for HttpRequest
Source§fn clone(&self) -> HttpRequest
fn clone(&self) -> HttpRequest
Returns a copy 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 Compose for HttpRequest
impl Compose for HttpRequest
Source§fn create(
&mut self,
) -> Result<AudioStream<Box<dyn MediaSource>>, AudioStreamError>
fn create( &mut self, ) -> Result<AudioStream<Box<dyn MediaSource>>, AudioStreamError>
Create a source synchronously. Read more
Source§fn create_async<'life0, 'async_trait>(
&'life0 mut self,
) -> Pin<Box<dyn Future<Output = Result<AudioStream<Box<dyn MediaSource>>, AudioStreamError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn create_async<'life0, 'async_trait>(
&'life0 mut self,
) -> Pin<Box<dyn Future<Output = Result<AudioStream<Box<dyn MediaSource>>, AudioStreamError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Create a source asynchronously. Read more
Source§fn should_create_async(&self) -> bool
fn should_create_async(&self) -> bool
Source§fn aux_metadata<'life0, 'async_trait>(
&'life0 mut self,
) -> Pin<Box<dyn Future<Output = Result<AuxMetadata, AudioStreamError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn aux_metadata<'life0, 'async_trait>(
&'life0 mut self,
) -> Pin<Box<dyn Future<Output = Result<AuxMetadata, AudioStreamError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Requests auxiliary metadata which can be accessed without parsing the file. Read more
Source§impl Debug for HttpRequest
impl Debug for HttpRequest
Source§impl From<HttpRequest> for Input
impl From<HttpRequest> for Input
Source§fn from(val: HttpRequest) -> Self
fn from(val: HttpRequest) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for HttpRequest
impl !RefUnwindSafe for HttpRequest
impl Send for HttpRequest
impl Sync for HttpRequest
impl Unpin for HttpRequest
impl !UnwindSafe for HttpRequest
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