Struct botx_api::api::context::BotXApiContext
source · pub struct BotXApiContext {
pub cts_url: String,
pub bot_id: String,
pub secret_key: String,
pub client: Client,
pub api: ApiEndpoints,
pub auth_token: Option<String>,
}Fields§
§cts_url: String§bot_id: String§secret_key: String§client: Client§api: ApiEndpoints§auth_token: Option<String>Implementations§
source§impl BotXApiContext
impl BotXApiContext
pub fn new( cts_url: impl Into<String>, bot_id: impl Into<String>, secret_key: impl Into<String> ) -> Self
pub fn from_client( cts_url: impl Into<String>, bot_id: impl Into<String>, secret_key: impl Into<String>, client: Client ) -> Self
pub fn from_env_with_default_client() -> Self
pub fn from_env(client: Client) -> Self
pub fn cts_url(&self) -> &str
pub fn bot_id(&self) -> &str
pub fn secret_key(&self) -> &str
Auto Trait Implementations§
impl !RefUnwindSafe for BotXApiContext
impl Send for BotXApiContext
impl Sync for BotXApiContext
impl Unpin for BotXApiContext
impl !UnwindSafe for BotXApiContext
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