Trait safe_vk::Method

source ·
pub trait Method {
    // Required methods
    fn new(token: String) -> Self;
    fn keyboard<T: Serialize + Send, N: NdArray<T> + Send>(
        &self,
        message: &str,
        one_time: bool,
        inline: bool,
        buttons: N
    ) -> impl Future<Output = Result<()>> + Send;
    fn event_answer<'de, T: Serialize + Send, A: DeserializeOwned + PartialEq + Serialize + Send>(
        &self,
        event_data: T,
        payload: A
    ) -> impl Future<Output = Result<Option<A>>> + Send;
    fn reply(&self, message: &str) -> impl Future<Output = ()> + Send;
    fn long_poll(
        &self,
        group_id: u32
    ) -> impl Future<Output = LongPollResponse> + Send;
    fn connect(
        &self,
        server: &str,
        token: String,
        ts: String,
        wait: usize
    ) -> impl Future<Output = Ctx> + Send;
    fn get_users(
        &self,
        user_ids: &[u64]
    ) -> impl Future<Output = Result<Vec<User>>> + Send;
    fn custom_request(&self) -> &RequestBuilder;
    fn context(&self) -> impl Future<Output = RwLockReadGuard<'_, Ctx>> + Send;
}

Required Methods§

source

fn new(token: String) -> Self

source

fn keyboard<T: Serialize + Send, N: NdArray<T> + Send>( &self, message: &str, one_time: bool, inline: bool, buttons: N ) -> impl Future<Output = Result<()>> + Send

source

fn event_answer<'de, T: Serialize + Send, A: DeserializeOwned + PartialEq + Serialize + Send>( &self, event_data: T, payload: A ) -> impl Future<Output = Result<Option<A>>> + Send

source

fn reply(&self, message: &str) -> impl Future<Output = ()> + Send

source

fn long_poll( &self, group_id: u32 ) -> impl Future<Output = LongPollResponse> + Send

source

fn connect( &self, server: &str, token: String, ts: String, wait: usize ) -> impl Future<Output = Ctx> + Send

source

fn get_users( &self, user_ids: &[u64] ) -> impl Future<Output = Result<Vec<User>>> + Send

source

fn custom_request(&self) -> &RequestBuilder

source

fn context(&self) -> impl Future<Output = RwLockReadGuard<'_, Ctx>> + Send

Object Safety§

This trait is not object safe.

Implementors§