Skip to main content

Response

Trait Response 

Source
pub trait Response {
Show 14 methods // Required methods fn msg(&self) -> &str; fn set_msg<'a, C: Into<Cow<'a, str>>>(&mut self, msg: C); fn with_msg<'a, C: Into<Cow<'a, str>>>(self, msg: C) -> Self; fn result(&self) -> ApiResult; fn set_result(&mut self, result: ApiResult); fn with_result(self, result: ApiResult) -> Self; fn code(&self) -> Option<ErrorCode>; fn set_code(&mut self, code: ErrorCode); fn unset_code(&mut self) -> Option<ErrorCode>; fn with_code(self, code: ErrorCode) -> Self; fn ignored_parameters_unsupported(&self) -> Option<&[String]>; fn set_ignored_parameters_unsupported<'a, C: Into<Cow<'a, [String]>>>( &mut self, val: C, ); fn unset_ignored_parameters_unsupported(&mut self) -> Option<Vec<String>>; fn with_ignored_parameters_unsupported<'a, C: Into<Cow<'a, [String]>>>( self, val: C, ) -> Self;
}
Expand description

Represents the common functions for all response types.

Required Methods§

Source

fn msg(&self) -> &str

Gets the Response msg field.

Source

fn set_msg<'a, C: Into<Cow<'a, str>>>(&mut self, msg: C)

Sets the Response msg field.

Source

fn with_msg<'a, C: Into<Cow<'a, str>>>(self, msg: C) -> Self

Builder function that sets the Response msg field.

Source

fn result(&self) -> ApiResult

Gets the Response result field.

Source

fn set_result(&mut self, result: ApiResult)

Sets the Response result field.

Source

fn with_result(self, result: ApiResult) -> Self

Builder function that sets the Response result field.

Source

fn code(&self) -> Option<ErrorCode>

Gets the Response code field.

Source

fn set_code(&mut self, code: ErrorCode)

Sets the Response code field.

Source

fn unset_code(&mut self) -> Option<ErrorCode>

Unsets the Response code field.

Source

fn with_code(self, code: ErrorCode) -> Self

Builder function that sets the Response code field.

Source

fn ignored_parameters_unsupported(&self) -> Option<&[String]>

Gets the Response ignored unsupported parameters list.

An array of any parameters sent in the request that are not supported by the endpoint.

See error handling documentation for details on this and its change history.

Source

fn set_ignored_parameters_unsupported<'a, C: Into<Cow<'a, [String]>>>( &mut self, val: C, )

Sets the Response ignored unsupported parameters list.

An array of any parameters sent in the request that are not supported by the endpoint.

See error handling documentation for details on this and its change history.

Source

fn unset_ignored_parameters_unsupported(&mut self) -> Option<Vec<String>>

Unsets the Response ignored unsupported parameters list.

An array of any parameters sent in the request that are not supported by the endpoint.

See error handling documentation for details on this and its change history.

Source

fn with_ignored_parameters_unsupported<'a, C: Into<Cow<'a, [String]>>>( self, val: C, ) -> Self

Builder function that sets the Response ignored unsupported parameters list.

An array of any parameters sent in the request that are not supported by the endpoint.

See error handling documentation for details on this and its change history.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§

Source§

impl Response for BaseResponse

Source§

impl Response for zulip_api::message::edit_message::Response

Source§

impl Response for zulip_api::message::fetch_api_key::Response

Source§

impl Response for zulip_api::message::get_file_temporary_url::Response

Source§

impl Response for zulip_api::message::get_message::Response

Source§

impl Response for zulip_api::message::get_message_history::Response

Source§

impl Response for zulip_api::message::get_messages::Response

Source§

impl Response for zulip_api::message::get_read_receipts::Response

Source§

impl Response for zulip_api::message::mark_all_as_read::Response

Source§

impl Response for zulip_api::message::matches_narrow::Response

Source§

impl Response for zulip_api::message::register::Response

Source§

impl Response for zulip_api::message::render::Response

Source§

impl Response for zulip_api::message::send_message::Response

Source§

impl Response for zulip_api::message::update_message_flags::Response

Source§

impl Response for zulip_api::message::update_message_flags_narrow::Response