Struct TornScope

Source
pub struct TornScope<E>(/* private fields */)
where
    E: Executor;

Implementations§

Source§

impl<E> TornScope<E>
where E: Executor,

Source

pub fn new(executor: E) -> Self

Source

pub async fn attacklog<S>( self, builder: impl FnOnce(TornAttacklogRequestBuilder<Empty>) -> TornAttacklogRequestBuilder<S>, ) -> Result<AttackLogResponse, E::Error>
where S: IsComplete,

Get attack log details

§Description

Requires public key.

Source

pub async fn bounties<S>( self, builder: impl FnOnce(TornBountiesRequestBuilder<Empty>) -> TornBountiesRequestBuilder<S>, ) -> Result<TornBountiesResponse, E::Error>
where S: IsComplete,

Get bounties

§Description

Requires public key.

Source

pub async fn calendar<S>( self, builder: impl FnOnce(TornCalendarRequestBuilder<Empty>) -> TornCalendarRequestBuilder<S>, ) -> Result<TornCalendarResponse, E::Error>
where S: IsComplete,

Get calendar information

§Description

Requires public access key.
Get the details about competitions & events in the running year.

Source

pub async fn crimes<S>( self, builder: impl FnOnce(TornCrimesRequestBuilder<Empty>) -> TornCrimesRequestBuilder<S>, ) -> Result<TornCrimesResponse, E::Error>
where S: IsComplete,

Get crimes information

§Description

Requires public access key.
Return the details about released crimes.

Source

pub async fn education<S>( self, builder: impl FnOnce(TornEducationRequestBuilder<Empty>) -> TornEducationRequestBuilder<S>, ) -> Result<TornEducationResponse, E::Error>
where S: IsComplete,

Get education information

§Description

Requires public access key.

Source

pub async fn factionhof<S>( self, builder: impl FnOnce(TornFactionhofRequestBuilder<Empty>) -> TornFactionhofRequestBuilder<S>, ) -> Result<TornFactionHofResponse, E::Error>
where S: IsComplete,

Get faction hall of fame positions for a specific category

§Description

Requires public access key.

Source

pub async fn factiontree<S>( self, builder: impl FnOnce(TornFactiontreeRequestBuilder<Empty>) -> TornFactiontreeRequestBuilder<S>, ) -> Result<TornFactionTreeResponse, E::Error>
where S: IsComplete,

Get full faction tree

§Description

Requires public access key.

Source

pub async fn hof<S>( self, builder: impl FnOnce(TornHofRequestBuilder<Empty>) -> TornHofRequestBuilder<S>, ) -> Result<TornHofResponse, E::Error>
where S: IsComplete,

Get player hall of fame positions for a specific category

§Description

Requires public key.

Source

pub async fn itemammo<S>( self, builder: impl FnOnce(TornItemammoRequestBuilder<Empty>) -> TornItemammoRequestBuilder<S>, ) -> Result<TornItemAmmoResponse, E::Error>
where S: IsComplete,

Get information about ammo

§Description

Requires public key.

Source

pub async fn itemmods<S>( self, builder: impl FnOnce(TornItemmodsRequestBuilder<Empty>) -> TornItemmodsRequestBuilder<S>, ) -> Result<TornItemModsResponse, E::Error>
where S: IsComplete,

Get information about weapon upgrades

§Description

Requires public key.

Source

pub async fn items<S>( self, builder: impl FnOnce(TornItemsRequestBuilder<Empty>) -> TornItemsRequestBuilder<S>, ) -> Result<TornItemsResponse, E::Error>
where S: IsComplete,

Get information about items

§Description

Requires public key.
Default category is ‘All’.
Details are not populated when requesting the category ‘All’.

Source

pub async fn items_for_ids<S>( self, ids: Ids, builder: impl FnOnce(TornItemsForIdsRequestBuilder<Empty>) -> TornItemsForIdsRequestBuilder<S>, ) -> Result<TornItemsResponse, E::Error>
where S: IsComplete,

Get information about items

§Description

Requires public key.
Details are always populated when available.

Source

pub async fn logcategories<S>( self, builder: impl FnOnce(TornLogcategoriesRequestBuilder<Empty>) -> TornLogcategoriesRequestBuilder<S>, ) -> Result<TornLogCategoriesResponse, E::Error>
where S: IsComplete,

Get available log categories

§Description

Requires public key.

Source

pub async fn logtypes<S>( self, builder: impl FnOnce(TornLogtypesRequestBuilder<Empty>) -> TornLogtypesRequestBuilder<S>, ) -> Result<TornLogTypesResponse, E::Error>
where S: IsComplete,

Get all available log ids

§Description

Requires public key.

Source

pub async fn logtypes_for_log_category_id<S>( self, log_category_id: LogCategoryId, builder: impl FnOnce(TornLogtypesForLogCategoryIdRequestBuilder<Empty>) -> TornLogtypesForLogCategoryIdRequestBuilder<S>, ) -> Result<TornLogTypesResponse, E::Error>
where S: IsComplete,

Get available log ids for a specific log category

§Description

Requires public key.

Source

pub async fn properties<S>( self, builder: impl FnOnce(TornPropertiesRequestBuilder<Empty>) -> TornPropertiesRequestBuilder<S>, ) -> Result<TornProperties, E::Error>
where S: IsComplete,

Get properties details

§Description

Requires public access key.

Source

pub async fn subcrimes_for_crime_id<S>( self, crime_id: TornCrimeId, builder: impl FnOnce(TornSubcrimesForCrimeIdRequestBuilder<Empty>) -> TornSubcrimesForCrimeIdRequestBuilder<S>, ) -> Result<TornSubcrimesResponse, E::Error>
where S: IsComplete,

Get Subcrimes information

§Description

Requires public access key.
Return the details about possible actions for a specific crime.

Source

pub async fn territory<S>( self, builder: impl FnOnce(TornTerritoryRequestBuilder<Empty>) -> TornTerritoryRequestBuilder<S>, ) -> Result<TornTerritoriesResponse, E::Error>
where S: IsComplete,

Get territory details

§Description

Requires public access key.

Source

pub async fn lookup<S>( self, builder: impl FnOnce(TornLookupRequestBuilder<Empty>) -> TornLookupRequestBuilder<S>, ) -> Result<TornLookupResponse, E::Error>
where S: IsComplete,

Get all available torn selections

§Description

Requires public key.

Source

pub async fn timestamp<S>( self, builder: impl FnOnce(TornTimestampRequestBuilder<Empty>) -> TornTimestampRequestBuilder<S>, ) -> Result<TimestampResponse, E::Error>
where S: IsComplete,

Get current server time

§Description

Requires public key.

Source

pub async fn for_selections<S>( self, builder: impl FnOnce(TornRequestBuilder<Empty>) -> TornRequestBuilder<S>, ) -> Result<Response, E::Error>
where S: IsComplete,

Get any Torn selection

§Description

Requires public access key.
Choose one or more selections (comma separated).

Auto Trait Implementations§

§

impl<E> Freeze for TornScope<E>
where E: Freeze,

§

impl<E> RefUnwindSafe for TornScope<E>
where E: RefUnwindSafe,

§

impl<E> Send for TornScope<E>
where E: Send,

§

impl<E> Sync for TornScope<E>
where E: Sync,

§

impl<E> Unpin for TornScope<E>
where E: Unpin,

§

impl<E> UnwindSafe for TornScope<E>
where E: UnwindSafe,

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> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
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, 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> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

impl<T> ErasedDestructor for T
where T: 'static,

Source§

impl<T> MaybeSendSync for T