Struct PuppetService

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

Implementations§

Source§

impl PuppetService

Source

pub async fn new(options: PuppetOptions) -> Result<Puppet<Self>, PuppetError>

Create puppet instance from puppet options.

First use endpoint, if endpoint is not given, try token instead.

Trait Implementations§

Source§

impl Clone for PuppetService

Source§

fn clone(&self) -> PuppetService

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl PuppetImpl for PuppetService

Source§

fn contact_self_name_set<'life0, 'async_trait>( &'life0 self, name: String, ) -> Pin<Box<dyn Future<Output = Result<(), PuppetError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source§

fn contact_self_qr_code<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = Result<String, PuppetError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source§

fn contact_self_signature_set<'life0, 'async_trait>( &'life0 self, signature: String, ) -> Pin<Box<dyn Future<Output = Result<(), PuppetError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source§

fn tag_contact_add<'life0, 'async_trait>( &'life0 self, tag_id: String, contact_id: String, ) -> Pin<Box<dyn Future<Output = Result<(), PuppetError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source§

fn tag_contact_remove<'life0, 'async_trait>( &'life0 self, tag_id: String, contact_id: String, ) -> Pin<Box<dyn Future<Output = Result<(), PuppetError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source§

fn tag_contact_delete<'life0, 'async_trait>( &'life0 self, tag_id: String, ) -> Pin<Box<dyn Future<Output = Result<(), PuppetError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source§

fn tag_contact_list<'life0, 'async_trait>( &'life0 self, contact_id: String, ) -> Pin<Box<dyn Future<Output = Result<Vec<String>, PuppetError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source§

fn tag_list<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = Result<Vec<String>, PuppetError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source§

fn contact_alias<'life0, 'async_trait>( &'life0 self, contact_id: String, ) -> Pin<Box<dyn Future<Output = Result<String, PuppetError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source§

fn contact_alias_set<'life0, 'async_trait>( &'life0 self, contact_id: String, alias: String, ) -> Pin<Box<dyn Future<Output = Result<(), PuppetError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source§

fn contact_avatar<'life0, 'async_trait>( &'life0 self, contact_id: String, ) -> Pin<Box<dyn Future<Output = Result<FileBox, PuppetError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source§

fn contact_avatar_set<'life0, 'async_trait>( &'life0 self, contact_id: String, file: FileBox, ) -> Pin<Box<dyn Future<Output = Result<(), PuppetError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source§

fn contact_phone_set<'life0, 'async_trait>( &'life0 self, contact_id: String, phone_list: Vec<String>, ) -> Pin<Box<dyn Future<Output = Result<(), PuppetError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source§

fn contact_corporation_remark_set<'life0, 'async_trait>( &'life0 self, contact_id: String, corporation_remark: Option<String>, ) -> Pin<Box<dyn Future<Output = Result<(), PuppetError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source§

fn contact_description_set<'life0, 'async_trait>( &'life0 self, contact_id: String, description: Option<String>, ) -> Pin<Box<dyn Future<Output = Result<(), PuppetError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source§

fn contact_list<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = Result<Vec<String>, PuppetError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source§

fn contact_raw_payload<'life0, 'async_trait>( &'life0 self, contact_id: String, ) -> Pin<Box<dyn Future<Output = Result<ContactPayload, PuppetError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source§

fn message_contact<'life0, 'async_trait>( &'life0 self, message_id: String, ) -> Pin<Box<dyn Future<Output = Result<String, PuppetError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source§

fn message_file<'life0, 'async_trait>( &'life0 self, message_id: String, ) -> Pin<Box<dyn Future<Output = Result<FileBox, PuppetError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source§

fn message_image<'life0, 'async_trait>( &'life0 self, message_id: String, image_type: ImageType, ) -> Pin<Box<dyn Future<Output = Result<FileBox, PuppetError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source§

fn message_mini_program<'life0, 'async_trait>( &'life0 self, message_id: String, ) -> Pin<Box<dyn Future<Output = Result<MiniProgramPayload, PuppetError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source§

fn message_url<'life0, 'async_trait>( &'life0 self, message_id: String, ) -> Pin<Box<dyn Future<Output = Result<UrlLinkPayload, PuppetError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source§

fn message_send_contact<'life0, 'async_trait>( &'life0 self, conversation_id: String, contact_id: String, ) -> Pin<Box<dyn Future<Output = Result<Option<String>, PuppetError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source§

fn message_send_file<'life0, 'async_trait>( &'life0 self, conversation_id: String, file: FileBox, ) -> Pin<Box<dyn Future<Output = Result<Option<String>, PuppetError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source§

fn message_send_mini_program<'life0, 'async_trait>( &'life0 self, conversation_id: String, mini_program_payload: MiniProgramPayload, ) -> Pin<Box<dyn Future<Output = Result<Option<String>, PuppetError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source§

fn message_send_text<'life0, 'async_trait>( &'life0 self, conversation_id: String, text: String, mention_id_list: Vec<String>, ) -> Pin<Box<dyn Future<Output = Result<Option<String>, PuppetError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source§

fn message_send_url<'life0, 'async_trait>( &'life0 self, conversation_id: String, url_link_payload: UrlLinkPayload, ) -> Pin<Box<dyn Future<Output = Result<Option<String>, PuppetError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source§

fn message_raw_payload<'life0, 'async_trait>( &'life0 self, message_id: String, ) -> Pin<Box<dyn Future<Output = Result<MessagePayload, PuppetError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source§

fn friendship_accept<'life0, 'async_trait>( &'life0 self, friendship_id: String, ) -> Pin<Box<dyn Future<Output = Result<(), PuppetError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source§

fn friendship_add<'life0, 'async_trait>( &'life0 self, contact_id: String, hello: Option<String>, ) -> Pin<Box<dyn Future<Output = Result<(), PuppetError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source§

fn friendship_search_phone<'life0, 'async_trait>( &'life0 self, phone: String, ) -> Pin<Box<dyn Future<Output = Result<Option<String>, PuppetError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source§

fn friendship_search_weixin<'life0, 'async_trait>( &'life0 self, weixin: String, ) -> Pin<Box<dyn Future<Output = Result<Option<String>, PuppetError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source§

fn friendship_raw_payload<'life0, 'async_trait>( &'life0 self, friendship_id: String, ) -> Pin<Box<dyn Future<Output = Result<FriendshipPayload, PuppetError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source§

fn room_invitation_accept<'life0, 'async_trait>( &'life0 self, room_invitation_id: String, ) -> Pin<Box<dyn Future<Output = Result<(), PuppetError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source§

fn room_invitation_raw_payload<'life0, 'async_trait>( &'life0 self, room_invitation_id: String, ) -> Pin<Box<dyn Future<Output = Result<RoomInvitationPayload, PuppetError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source§

fn room_add<'life0, 'async_trait>( &'life0 self, room_id: String, contact_id: String, ) -> Pin<Box<dyn Future<Output = Result<(), PuppetError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source§

fn room_avatar<'life0, 'async_trait>( &'life0 self, room_id: String, ) -> Pin<Box<dyn Future<Output = Result<FileBox, PuppetError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source§

fn room_create<'life0, 'async_trait>( &'life0 self, contact_id_list: Vec<String>, topic: Option<String>, ) -> Pin<Box<dyn Future<Output = Result<String, PuppetError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source§

fn room_del<'life0, 'async_trait>( &'life0 self, room_id: String, contact_id: String, ) -> Pin<Box<dyn Future<Output = Result<(), PuppetError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source§

fn room_qr_code<'life0, 'async_trait>( &'life0 self, room_id: String, ) -> Pin<Box<dyn Future<Output = Result<String, PuppetError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source§

fn room_quit<'life0, 'async_trait>( &'life0 self, room_id: String, ) -> Pin<Box<dyn Future<Output = Result<(), PuppetError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source§

fn room_topic<'life0, 'async_trait>( &'life0 self, room_id: String, ) -> Pin<Box<dyn Future<Output = Result<String, PuppetError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source§

fn room_topic_set<'life0, 'async_trait>( &'life0 self, room_id: String, topic: String, ) -> Pin<Box<dyn Future<Output = Result<(), PuppetError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source§

fn room_list<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = Result<Vec<String>, PuppetError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source§

fn room_raw_payload<'life0, 'async_trait>( &'life0 self, room_id: String, ) -> Pin<Box<dyn Future<Output = Result<RoomPayload, PuppetError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source§

fn room_announce<'life0, 'async_trait>( &'life0 self, room_id: String, ) -> Pin<Box<dyn Future<Output = Result<String, PuppetError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source§

fn room_announce_set<'life0, 'async_trait>( &'life0 self, room_id: String, text: String, ) -> Pin<Box<dyn Future<Output = Result<(), PuppetError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source§

fn room_member_list<'life0, 'async_trait>( &'life0 self, room_id: String, ) -> Pin<Box<dyn Future<Output = Result<Vec<String>, PuppetError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source§

fn room_member_raw_payload<'life0, 'async_trait>( &'life0 self, room_id: String, contact_id: String, ) -> Pin<Box<dyn Future<Output = Result<RoomMemberPayload, PuppetError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source§

fn start<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = Result<(), PuppetError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source§

fn stop<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = Result<(), PuppetError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source§

fn ding<'life0, 'async_trait>( &'life0 self, data: String, ) -> Pin<Box<dyn Future<Output = Result<(), PuppetError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source§

fn version<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = Result<String, PuppetError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source§

fn logout<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = Result<(), PuppetError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: '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> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. 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> 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> IntoRequest<T> for T

Source§

fn into_request(self) -> Request<T>

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

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
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> 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,