Struct BotXApiFrameworkContext

Source
pub struct BotXApiFrameworkContext { /* private fields */ }

Implementations§

Source§

impl BotXApiFrameworkContext

Контекст фреймворка. Обрабатывает приходящие команды сконфигурированным набором обработчиков

Source

pub const BUTTON_HANDLER_NOT_FOUND_RESPONSE: &str = "Кнопка не обработана. Для команды не найден обработчик."

Source

pub const COMMAND_HANDLER_NOT_FOUND_RESPONSE: &str = "Команда не обработана. Нет обработчиков с подходящим регулярным выражением. Для команды не зарегистрирован дефолтный обработчик."

Source

pub const MESSAGE_HANDLER_NOT_FOUND_RESPONSE: &str = "Сообщение не обработано. Для сообщения не найден обработчик."

Source

pub const CHAT_CREATED_HANDLER_NOT_FOUND_RESPONSE: &str = "Событие создания чата не обработано. Для события не найден обработчик."

Source

pub const CHAT_DELETED_BY_USER_HANDLER_NOT_FOUND_RESPONSE: &str = "Событие удаления чата пользователем не обработано. Для события не найден обработчик."

Source

pub const ADDED_TO_CHAT_HANDLER_NOT_FOUND_RESPONSE: &str = "Событие добавления участника в чат не обработано. Для события не найден обработчик."

Source

pub const DELETED_FROM_CHAT_HANDLER_NOT_FOUND_RESPONSE: &str = "Событие удаления участника из чата не обработано. Для события не найден обработчик."

Source

pub const LEFT_FROM_CHAT_HANDLER_NOT_FOUND_RESPONSE: &str = "Событие выхода участника из чата не обработано. Для события не найден обработчик."

Source

pub const EVENT_EDIT_HANDLER_NOT_FOUND_RESPONSE: &str = "Событие редактирования события пользователем не обработано. Для события не найден обработчик."

Source

pub const INTERNAL_BOT_NOTIFICATION_HANDLER_NOT_FOUND_RESPONSE: &str = "Событие внутренней бот нотификации не обработано. Для события не найден обработчик."

Source

pub const SMARTAPP_EVENT_HANDLER_NOT_FOUND_RESPONSE: &str = "Событие смартап не обработано. Для события не найден обработчик."

Source

pub const CTS_LOGIN_HANDLER_NOT_FOUND_RESPONSE: &str = "Событие входа участника в cts не обработано. Для события не найден обработчик."

Source

pub const CTS_LOGOUT_HANDLER_NOT_FOUND_RESPONSE: &str = "Событие выхода участника из cts не обработано. Для события не найден обработчик."

Source

pub const NOTIFICATION_CALLBACK_HANDLER_NOT_FOUND_RESPONSE: &str = "Обратный вызов с результатом нотификации не обработан. Для события не найден обработчик."

Source

pub const STATUS_HANDLER_NOT_FOUND_RESPONSE: &str = "Запрос статуса не обработан. Для события не найден обработчик."

Source

pub fn new() -> Self

Строит новый контекст фреймворка

Source

pub async fn from_di_container(di_container: DependencyContext) -> Self

Строит новый контекст фреймворка из переданного ioc контекста

Source

pub fn di_container(&self) -> &DependencyContext

Di котекст который используется фреймворком для поиска зависимостей

Source

pub async fn process_command( &self, request: CommandRequest<Value, Value>, ) -> CommandResult

Обработка события отправленных боту

Source

pub async fn process_notification_result( &self, request: ExpressResult<NotificationCallbackRequestOk, NotificationCallbackRequestError>, )

Source

pub async fn process_status_result( &self, request: StatusRequest, ) -> Option<StatusResponse>

Trait Implementations§

Source§

impl Constructor for BotXApiFrameworkContext

Source§

fn ctor<'async_trait>( ctx: DependencyContext, ) -> Pin<Box<dyn Future<Output = BuildDependencyResult<Self>> + Send + Sync + 'async_trait>>
where Self: 'async_trait,

Auto Trait Implementations§

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

Source§

type Output = T

Should always be Self
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<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V

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,