pub struct TorrentRequestLinkQuery {
pub torrent_id: u32,
pub file_id: Option<u32>,
pub zip_link: bool,
pub user_ip: Option<String>,
pub redirect: bool,
/* private fields */
}
Fields§
§torrent_id: u32
The torrent’s ID that you want to download
file_id: Option<u32>
The files’s ID that you want to download.
zip_link: bool
If you want a zip link. Required if no file_id. Takes precedence over file_id if both are given.
user_ip: Option<String>
The user’s IP to determine the closest CDN. Optional.
Preferably check IPv4 if correct first.
redirect: bool
If you want to redirect the user to the CDN link.
This is useful for creating permalinks so that you can just make this request URL the link.
Trait Implementations§
Source§impl Debug for TorrentRequestLinkQuery
impl Debug for TorrentRequestLinkQuery
Source§impl NamedType for TorrentRequestLinkQuery
impl NamedType for TorrentRequestLinkQuery
fn sid() -> SpectaID
Source§fn named_data_type(
type_map: &mut TypeCollection,
generics: &[DataType],
) -> NamedDataType
fn named_data_type( type_map: &mut TypeCollection, generics: &[DataType], ) -> NamedDataType
this is equivalent to Type::inline but returns a NamedDataType instead.
Source§fn definition_named_data_type(type_map: &mut TypeCollection) -> NamedDataType
fn definition_named_data_type(type_map: &mut TypeCollection) -> NamedDataType
this is equivalent to [Type::definition] but returns a NamedDataType instead.
Source§impl Serialize for TorrentRequestLinkQuery
impl Serialize for TorrentRequestLinkQuery
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
Source§impl Type for TorrentRequestLinkQuery
impl Type for TorrentRequestLinkQuery
Source§fn inline(type_map: &mut TypeCollection, generics: Generics<'_>) -> DataType
fn inline(type_map: &mut TypeCollection, generics: Generics<'_>) -> DataType
Returns the definition of a type using the provided generics. Read more
Source§fn reference(type_map: &mut TypeCollection, generics: &[DataType]) -> Reference
fn reference(type_map: &mut TypeCollection, generics: &[DataType]) -> Reference
Generates a datatype corresponding to a reference to this type,
as determined by its category. Getting a reference to a type implies that
it should belong in the type map (since it has to be referenced from somewhere),
so the output of
definition
will be put into the type map.impl Flatten for TorrentRequestLinkQuery
Auto Trait Implementations§
impl Freeze for TorrentRequestLinkQuery
impl RefUnwindSafe for TorrentRequestLinkQuery
impl Send for TorrentRequestLinkQuery
impl Sync for TorrentRequestLinkQuery
impl Unpin for TorrentRequestLinkQuery
impl UnwindSafe for TorrentRequestLinkQuery
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