PuppetClient

Struct PuppetClient 

Source
pub struct PuppetClient<T> { /* private fields */ }

Implementations§

Source§

impl PuppetClient<Channel>

Source

pub async fn connect<D>(dst: D) -> Result<Self, Error>
where D: TryInto<Endpoint>, D::Error: Into<StdError>,

Attempt to create a new client by connecting to a given endpoint.

Source§

impl<T> PuppetClient<T>
where T: GrpcService<BoxBody>, T::ResponseBody: Body + Send + Sync + 'static, T::Error: Into<StdError>, <T::ResponseBody as Body>::Error: Into<StdError> + Send,

Source

pub fn new(inner: T) -> Self

Source

pub fn with_interceptor<F>( inner: T, interceptor: F, ) -> PuppetClient<InterceptedService<T, F>>
where F: Interceptor, T: Service<Request<BoxBody>, Response = Response<<T as GrpcService<BoxBody>>::ResponseBody>>, <T as Service<Request<BoxBody>>>::Error: Into<StdError> + Send + Sync,

Source

pub fn send_gzip(self) -> Self

Compress requests with gzip.

This requires the server to support it otherwise it might respond with an error.

Source

pub fn accept_gzip(self) -> Self

Enable decompressing responses with gzip.

Source

pub async fn start( &mut self, request: impl IntoRequest<StartRequest>, ) -> Result<Response<StartResponse>, Status>

Base

Source

pub async fn stop( &mut self, request: impl IntoRequest<StopRequest>, ) -> Result<Response<StopResponse>, Status>

Source

pub async fn logout( &mut self, request: impl IntoRequest<LogoutRequest>, ) -> Result<Response<LogoutResponse>, Status>

Source

pub async fn ding( &mut self, request: impl IntoRequest<DingRequest>, ) -> Result<Response<DingResponse>, Status>

Source

pub async fn version( &mut self, request: impl IntoRequest<VersionRequest>, ) -> Result<Response<VersionResponse>, Status>

Source

pub async fn event( &mut self, request: impl IntoRequest<EventRequest>, ) -> Result<Response<Streaming<EventResponse>>, Status>

Event - Server Stream

Source

pub async fn dirty_payload( &mut self, request: impl IntoRequest<DirtyPayloadRequest>, ) -> Result<Response<DirtyPayloadResponse>, Status>

Source

pub async fn contact_self_qr_code( &mut self, request: impl IntoRequest<ContactSelfQrCodeRequest>, ) -> Result<Response<ContactSelfQrCodeResponse>, Status>

Contact Self

Source

pub async fn contact_self_name( &mut self, request: impl IntoRequest<ContactSelfNameRequest>, ) -> Result<Response<ContactSelfNameResponse>, Status>

Source

pub async fn contact_self_signature( &mut self, request: impl IntoRequest<ContactSelfSignatureRequest>, ) -> Result<Response<ContactSelfSignatureResponse>, Status>

Source

pub async fn contact_payload( &mut self, request: impl IntoRequest<ContactPayloadRequest>, ) -> Result<Response<ContactPayloadResponse>, Status>

Contact

Source

pub async fn contact_alias( &mut self, request: impl IntoRequest<ContactAliasRequest>, ) -> Result<Response<ContactAliasResponse>, Status>

Source

pub async fn contact_avatar( &mut self, request: impl IntoRequest<ContactAvatarRequest>, ) -> Result<Response<ContactAvatarResponse>, Status>

Source

pub async fn contact_phone( &mut self, request: impl IntoRequest<ContactPhoneRequest>, ) -> Result<Response<ContactPhoneResponse>, Status>

Source

pub async fn contact_corporation_remark( &mut self, request: impl IntoRequest<ContactCorporationRemarkRequest>, ) -> Result<Response<ContactCorporationRemarkResponse>, Status>

Source

pub async fn contact_description( &mut self, request: impl IntoRequest<ContactDescriptionRequest>, ) -> Result<Response<ContactDescriptionResponse>, Status>

Source

pub async fn contact_list( &mut self, request: impl IntoRequest<ContactListRequest>, ) -> Result<Response<ContactListResponse>, Status>

Huan(202002): consider changing response to a stream in the future for better performance

Source

pub async fn friendship_payload( &mut self, request: impl IntoRequest<FriendshipPayloadRequest>, ) -> Result<Response<FriendshipPayloadResponse>, Status>

Friendship

Source

pub async fn friendship_search_phone( &mut self, request: impl IntoRequest<FriendshipSearchPhoneRequest>, ) -> Result<Response<FriendshipSearchPhoneResponse>, Status>

Source

pub async fn friendship_search_weixin( &mut self, request: impl IntoRequest<FriendshipSearchWeixinRequest>, ) -> Result<Response<FriendshipSearchWeixinResponse>, Status>

Source

pub async fn friendship_add( &mut self, request: impl IntoRequest<FriendshipAddRequest>, ) -> Result<Response<FriendshipAddResponse>, Status>

Source

pub async fn friendship_accept( &mut self, request: impl IntoRequest<FriendshipAcceptRequest>, ) -> Result<Response<FriendshipAcceptResponse>, Status>

Source

pub async fn message_file( &mut self, request: impl IntoRequest<MessageFileRequest>, ) -> Result<Response<MessageFileResponse>, Status>

@deprecated: using MessageFileStream to transfer files Huan(202010): will be removed (replaced by MessageFileStream) after Dec 31, 2021

Source

pub async fn message_image( &mut self, request: impl IntoRequest<MessageImageRequest>, ) -> Result<Response<MessageImageResponse>, Status>

@deprecated: using MessageImageStream to transfer images Huan(202010): will be removed (replaced by MessageImageStream) after Dec 31, 2021

Source

pub async fn message_send_file( &mut self, request: impl IntoRequest<MessageSendFileRequest>, ) -> Result<Response<MessageSendFileResponse>, Status>

@deprecated: using MesageSendFileStream to transfer file message to server Huan(202010): will be removed (replaced by MessageSendFileStream) after Dec 31, 2021

Source

pub async fn message_payload( &mut self, request: impl IntoRequest<MessagePayloadRequest>, ) -> Result<Response<MessagePayloadResponse>, Status>

Source

pub async fn message_contact( &mut self, request: impl IntoRequest<MessageContactRequest>, ) -> Result<Response<MessageContactResponse>, Status>

Source

pub async fn message_file_stream( &mut self, request: impl IntoRequest<MessageFileStreamRequest>, ) -> Result<Response<Streaming<MessageFileStreamResponse>>, Status>

Source

pub async fn message_image_stream( &mut self, request: impl IntoRequest<MessageImageStreamRequest>, ) -> Result<Response<Streaming<MessageImageStreamResponse>>, Status>

Source

pub async fn message_mini_program( &mut self, request: impl IntoRequest<MessageMiniProgramRequest>, ) -> Result<Response<MessageMiniProgramResponse>, Status>

Source

pub async fn message_url( &mut self, request: impl IntoRequest<MessageUrlRequest>, ) -> Result<Response<MessageUrlResponse>, Status>

Source

pub async fn message_recall( &mut self, request: impl IntoRequest<MessageRecallRequest>, ) -> Result<Response<MessageRecallResponse>, Status>

Source

pub async fn message_forward( &mut self, request: impl IntoRequest<MessageForwardRequest>, ) -> Result<Response<MessageForwardResponse>, Status>

Source

pub async fn message_send_contact( &mut self, request: impl IntoRequest<MessageSendContactRequest>, ) -> Result<Response<MessageSendContactResponse>, Status>

Source

pub async fn message_send_file_stream( &mut self, request: impl IntoStreamingRequest<Message = MessageSendFileStreamRequest>, ) -> Result<Response<MessageSendFileStreamResponse>, Status>

Source

pub async fn message_send_text( &mut self, request: impl IntoRequest<MessageSendTextRequest>, ) -> Result<Response<MessageSendTextResponse>, Status>

Source

pub async fn message_send_mini_program( &mut self, request: impl IntoRequest<MessageSendMiniProgramRequest>, ) -> Result<Response<MessageSendMiniProgramResponse>, Status>

Source

pub async fn message_send_url( &mut self, request: impl IntoRequest<MessageSendUrlRequest>, ) -> Result<Response<MessageSendUrlResponse>, Status>

Source

pub async fn room_payload( &mut self, request: impl IntoRequest<RoomPayloadRequest>, ) -> Result<Response<RoomPayloadResponse>, Status>

Room

Source

pub async fn room_list( &mut self, request: impl IntoRequest<RoomListRequest>, ) -> Result<Response<RoomListResponse>, Status>

Source

pub async fn room_add( &mut self, request: impl IntoRequest<RoomAddRequest>, ) -> Result<Response<RoomAddResponse>, Status>

Source

pub async fn room_avatar( &mut self, request: impl IntoRequest<RoomAvatarRequest>, ) -> Result<Response<RoomAvatarResponse>, Status>

Source

pub async fn room_create( &mut self, request: impl IntoRequest<RoomCreateRequest>, ) -> Result<Response<RoomCreateResponse>, Status>

Source

pub async fn room_del( &mut self, request: impl IntoRequest<RoomDelRequest>, ) -> Result<Response<RoomDelResponse>, Status>

Source

pub async fn room_quit( &mut self, request: impl IntoRequest<RoomQuitRequest>, ) -> Result<Response<RoomQuitResponse>, Status>

Source

pub async fn room_topic( &mut self, request: impl IntoRequest<RoomTopicRequest>, ) -> Result<Response<RoomTopicResponse>, Status>

Source

pub async fn room_qr_code( &mut self, request: impl IntoRequest<RoomQrCodeRequest>, ) -> Result<Response<RoomQrCodeResponse>, Status>

Source

pub async fn room_announce( &mut self, request: impl IntoRequest<RoomAnnounceRequest>, ) -> Result<Response<RoomAnnounceResponse>, Status>

Source

pub async fn room_member_payload( &mut self, request: impl IntoRequest<RoomMemberPayloadRequest>, ) -> Result<Response<RoomMemberPayloadResponse>, Status>

Room Member

Source

pub async fn room_member_list( &mut self, request: impl IntoRequest<RoomMemberListRequest>, ) -> Result<Response<RoomMemberListResponse>, Status>

Source

pub async fn room_invitation_payload( &mut self, request: impl IntoRequest<RoomInvitationPayloadRequest>, ) -> Result<Response<RoomInvitationPayloadResponse>, Status>

Room Invitation

Source

pub async fn room_invitation_accept( &mut self, request: impl IntoRequest<RoomInvitationAcceptRequest>, ) -> Result<Response<RoomInvitationAcceptResponse>, Status>

Source

pub async fn tag_contact_add( &mut self, request: impl IntoRequest<TagContactAddRequest>, ) -> Result<Response<TagContactAddResponse>, Status>

Tag

Source

pub async fn tag_contact_remove( &mut self, request: impl IntoRequest<TagContactRemoveRequest>, ) -> Result<Response<TagContactRemoveResponse>, Status>

Source

pub async fn tag_contact_delete( &mut self, request: impl IntoRequest<TagContactDeleteRequest>, ) -> Result<Response<TagContactDeleteResponse>, Status>

Operate Sub-Collections https://cloud.google.com/apis/design/design_patterns#list_sub-collections

Source

pub async fn tag_contact_list( &mut self, request: impl IntoRequest<TagContactListRequest>, ) -> Result<Response<TagContactListResponse>, Status>

Trait Implementations§

Source§

impl<T: Clone> Clone for PuppetClient<T>

Source§

fn clone(&self) -> PuppetClient<T>

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<T: Debug> Debug for PuppetClient<T>

Source§

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

Formats the value using the given formatter. Read more

Auto Trait Implementations§

§

impl<T> Freeze for PuppetClient<T>
where T: Freeze,

§

impl<T> RefUnwindSafe for PuppetClient<T>
where T: RefUnwindSafe,

§

impl<T> Send for PuppetClient<T>
where T: Send,

§

impl<T> Sync for PuppetClient<T>
where T: Sync,

§

impl<T> Unpin for PuppetClient<T>
where T: Unpin,

§

impl<T> UnwindSafe for PuppetClient<T>
where T: UnwindSafe,

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, 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