pub struct TorrentExportDataQuery {
pub torrent_id: u32,
pub data_type: TorrentExportType,
}
Fields§
§torrent_id: u32
§data_type: TorrentExportType
Either “magnet” or “file”. Tells how the API what to get, and what to respond as.
If magnet, it returns a JSON response with the magnet as a string in the data key. If file, it responds with a torrent file download.
Trait Implementations§
Source§impl Debug for TorrentExportDataQuery
impl Debug for TorrentExportDataQuery
Source§impl NamedType for TorrentExportDataQuery
impl NamedType for TorrentExportDataQuery
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 TorrentExportDataQuery
impl Serialize for TorrentExportDataQuery
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 TorrentExportDataQuery
impl Type for TorrentExportDataQuery
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 TorrentExportDataQuery
Auto Trait Implementations§
impl Freeze for TorrentExportDataQuery
impl RefUnwindSafe for TorrentExportDataQuery
impl Send for TorrentExportDataQuery
impl Sync for TorrentExportDataQuery
impl Unpin for TorrentExportDataQuery
impl UnwindSafe for TorrentExportDataQuery
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