pub struct ClientData {
Show 23 fields pub shard_manager: Arc<ShardManager>, pub nekos_client: NekosClient, pub r6stats_client: R6StatsClient, pub r6tracker_client: R6TrackerClient, pub rule34_client: Rule34Client, pub quizizz_client: QuizizzClient, pub fml_client: FmlClient, pub shift_client: ShiftClient, pub reddit_embed_data: RedditEmbedData, pub enabled_check_data: EnabledCheckData, pub insta_client: Client, pub deviantart_client: DeviantartClient, pub urban_client: UrbanClient, pub xkcd_client: Client, pub tic_tac_toe_data: TicTacToeData, pub iqdb_client: IqdbClient, pub sauce_nao_client: SauceNaoClient, pub open_ai_client: Client, pub yodaspeak: Client, pub tiktok_data: TikTokData, pub encoder_task: EncoderTask, pub db: Database, pub config: Arc<Config>,
}
Expand description

Fields§

§shard_manager: Arc<ShardManager>

The discord shard_manager

§nekos_client: NekosClient

The client for nekos

§r6stats_client: R6StatsClient

The R6Stats client

§r6tracker_client: R6TrackerClient

The r6tracker client

§rule34_client: Rule34Client

The rule34 client

§quizizz_client: QuizizzClient

The quizizz client

§fml_client: FmlClient

The fml client

§shift_client: ShiftClient

The shift client

§reddit_embed_data: RedditEmbedData

The reddit embed data

§enabled_check_data: EnabledCheckData

The enabled check data

§insta_client: Client

The insta client data

§deviantart_client: DeviantartClient

The deviantart client

§urban_client: UrbanClient

The urban dictionary client

§xkcd_client: Client

The xkcd client

§tic_tac_toe_data: TicTacToeData

The tic tac toe data

§iqdb_client: IqdbClient

The iqdb client

§sauce_nao_client: SauceNaoClient

The sauce nao client

§open_ai_client: Client

The open ai client

§yodaspeak: Client

The yodaspeak client

§tiktok_data: TikTokData

TikTokData

§encoder_task: EncoderTask

Encoder Task

§db: Database

The database

§config: Arc<Config>

The config

Implementations§

source§

impl ClientData

source

pub async fn init( shard_manager: Arc<ShardManager>, config: Arc<Config>, db: Database ) -> Result<Self>

Init this client data

source

pub fn generate_cache_stats( &self ) -> BTreeMap<&'static str, BTreeMap<&'static str, f32>>

Generate cache stats Currently, In order for something to show up in cache-stats it must be added here. More automation is desirable in the future.

source

pub async fn shutdown(&self)

Shutdown anything that needs to be shut down.

Errors are logged to the console, but not returned to the user as it is assumed that they don’t matter in the middle of a shutdown.

Trait Implementations§

source§

impl Debug for ClientData

source§

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

Formats the value using the given formatter. Read more

Auto Trait Implementations§

Blanket Implementations§

source§

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

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

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

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere 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.

§

impl<T> FutureExt for T

§

fn with_context(self, otel_cx: Context) -> WithContext<Self>

Attaches the provided Context to this type, returning a WithContext wrapper. Read more
§

fn with_current_context(self) -> WithContext<Self>

Attaches the current Context to this type, returning a WithContext wrapper. Read more
§

impl<T> Instrument for T

§

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

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

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 Twhere 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> IntoRequest<T> for T

source§

fn into_request(self) -> Request<T>

Wrap the input message T in a tonic::Request
§

impl<F, T> IntoSample<T> for Fwhere T: FromSample<F>,

§

fn into_sample(self) -> T

§

impl<T> Pointable for T

§

const ALIGN: usize = _

The alignment of pointer.
§

type Init = T

The type for initializers.
§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
source§

impl<T> Same for T

§

type Output = T

Should always be Self
source§

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

§

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 Twhere U: TryFrom<T>,

§

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.
§

impl<V, T> VZip<V> for Twhere V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

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
§

fn with_current_subscriber(self) -> WithDispatch<Self>

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

impl<T> DebuggableStorage for Twhere T: Any + Send + Sync + Debug,