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§
Sourcefn with_msg<'a, C: Into<Cow<'a, str>>>(self, msg: C) -> Self
fn with_msg<'a, C: Into<Cow<'a, str>>>(self, msg: C) -> Self
Builder function that sets the Response msg field.
Sourcefn set_result(&mut self, result: ApiResult)
fn set_result(&mut self, result: ApiResult)
Sets the Response result field.
Sourcefn with_result(self, result: ApiResult) -> Self
fn with_result(self, result: ApiResult) -> Self
Builder function that sets the Response result field.
Sourcefn unset_code(&mut self) -> Option<ErrorCode>
fn unset_code(&mut self) -> Option<ErrorCode>
Unsets the Response code field.
Sourcefn with_code(self, code: ErrorCode) -> Self
fn with_code(self, code: ErrorCode) -> Self
Builder function that sets the Response code field.
Sourcefn ignored_parameters_unsupported(&self) -> Option<&[String]>
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.
Sourcefn set_ignored_parameters_unsupported<'a, C: Into<Cow<'a, [String]>>>(
&mut self,
val: C,
)
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.
Sourcefn unset_ignored_parameters_unsupported(&mut self) -> Option<Vec<String>>
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.
Sourcefn with_ignored_parameters_unsupported<'a, C: Into<Cow<'a, [String]>>>(
self,
val: C,
) -> Self
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".