Struct RsRequest

Source
pub struct RsRequest {
Show 27 fields pub upload_id: Option<String>, pub url: String, pub mime: Option<String>, pub size: Option<u64>, pub filename: Option<String>, pub status: RsRequestStatus, pub permanent: bool, pub json_body: Option<Value>, pub method: RsRequestMethod, pub referer: Option<String>, pub headers: Option<Vec<(String, String)>>, pub cookies: Option<Vec<RsCookie>>, pub files: Option<Vec<RsRequestFiles>>, pub selected_file: Option<String>, pub description: Option<String>, pub tags: Option<Vec<String>>, pub people: Option<Vec<String>>, pub albums: Option<Vec<String>>, pub season: Option<u32>, pub episode: Option<u32>, pub language: Option<String>, pub resolution: Option<RsResolution>, pub video_format: Option<RsVideoFormat>, pub videocodec: Option<RsVideoCodec>, pub audio: Option<Vec<RsAudio>>, pub quality: Option<u64>, pub ignore_origin_duplicate: bool,
}

Fields§

§upload_id: Option<String>§url: String§mime: Option<String>§size: Option<u64>§filename: Option<String>§status: RsRequestStatus§permanent: bool

If true this request can be saved for later use and will remain valid If Permanent is true but status is intermediate the process will go through request plugins to try to get a permanant link

§json_body: Option<Value>§method: RsRequestMethod§referer: Option<String>§headers: Option<Vec<(String, String)>>§cookies: Option<Vec<RsCookie>>

some downloader like YTDL require detailed cookies. You can create Header equivalent with headers fn on the vector

§files: Option<Vec<RsRequestFiles>>

If must choose between multiple files. Recall plugin with a selected_file containing one of the name in this list to get link

§selected_file: Option<String>

one of the files selected for download

§description: Option<String>§tags: Option<Vec<String>>§people: Option<Vec<String>>§albums: Option<Vec<String>>§season: Option<u32>§episode: Option<u32>§language: Option<String>§resolution: Option<RsResolution>§video_format: Option<RsVideoFormat>§videocodec: Option<RsVideoCodec>§audio: Option<Vec<RsAudio>>§quality: Option<u64>§ignore_origin_duplicate: bool

Implementations§

Source§

impl RsRequest

Source

pub fn set_cookies(&mut self, cookies: Vec<RsCookie>)

Source

pub fn filename_or_extract_from_url(&self) -> Option<String>

Source

pub fn parse_filename(&mut self)

Source

pub fn parse_subfilenames(&mut self)

Trait Implementations§

Source§

impl Clone for RsRequest

Source§

fn clone(&self) -> RsRequest

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for RsRequest

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for RsRequest

Source§

fn default() -> RsRequest

Returns the “default value” for a type. Read more
Source§

impl<'de> Deserialize<'de> for RsRequest

Source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl PartialEq for RsRequest

Source§

fn eq(&self, other: &RsRequest) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl Serialize for RsRequest

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
Source§

impl StructuralPartialEq for RsRequest

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,