pub struct Response { /* private fields */ }Expand description
Represents a response from the Fetch API Key Zulip endpoint.
Allows third-party applications to use a username-password authentication method.
Implementations§
Source§impl Response
impl Response
Sourcepub fn api_key(&self) -> Option<&str>
pub fn api_key(&self) -> Option<&str>
Gets the Response api_key.
The API key that can be used to authenticate as the requested user.
Sourcepub fn set_api_key<'a, C: Into<Cow<'a, str>>>(&mut self, val: C)
pub fn set_api_key<'a, C: Into<Cow<'a, str>>>(&mut self, val: C)
Sets the Response api_key.
The API key that can be used to authenticate as the requested user.
Sourcepub fn unset_api_key(&mut self) -> Option<String>
pub fn unset_api_key(&mut self) -> Option<String>
Unsets the Response api_key.
The API key that can be used to authenticate as the requested user.
Sourcepub fn with_api_key<'a, C: Into<Cow<'a, str>>>(self, val: C) -> Self
pub fn with_api_key<'a, C: Into<Cow<'a, str>>>(self, val: C) -> Self
Builder function that sets the Response api_key.
The API key that can be used to authenticate as the requested user.
Sourcepub fn email(&self) -> Option<&str>
pub fn email(&self) -> Option<&str>
Gets the Response email.
The email address of the user who owns the API key.
Sourcepub fn set_email<'a, C: Into<Cow<'a, str>>>(&mut self, val: C)
pub fn set_email<'a, C: Into<Cow<'a, str>>>(&mut self, val: C)
Sets the Response email.
The email address of the user who owns the API key.
Sourcepub fn unset_email(&mut self) -> Option<String>
pub fn unset_email(&mut self) -> Option<String>
Unsets the Response email.
The email address of the user who owns the API key.
Source§impl Response
impl Response
Sourcepub const fn user_id(&self) -> Option<i64>
pub const fn user_id(&self) -> Option<i64>
Gets the Response user_id.
The unique ID of the user who owns the API key.
Changes: New in Zulip 7.0 (feature level 171).
Sourcepub fn set_user_id(&mut self, val: i64)
pub fn set_user_id(&mut self, val: i64)
Sets the Response user_id.
The unique ID of the user who owns the API key.
Changes: New in Zulip 7.0 (feature level 171).
Sourcepub fn unset_user_id(&mut self) -> Option<i64>
pub fn unset_user_id(&mut self) -> Option<i64>
Unsets the Response user_id.
The unique ID of the user who owns the API key.
Changes: New in Zulip 7.0 (feature level 171).
Sourcepub fn with_user_id(self, val: i64) -> Self
pub fn with_user_id(self, val: i64) -> Self
Builder function that sets the Response user_id.
The unique ID of the user who owns the API key.
Changes: New in Zulip 7.0 (feature level 171).
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Response
impl<'de> Deserialize<'de> for Response
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
impl Eq for Response
Source§impl Response for Response
impl Response for Response
Source§fn 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
msg field.Source§fn set_result(&mut self, result: ApiResult)
fn set_result(&mut self, result: ApiResult)
result field.Source§fn with_result(self, result: ApiResult) -> Self
fn with_result(self, result: ApiResult) -> Self
result field.Source§fn with_code(self, code: ErrorCode) -> Self
fn with_code(self, code: ErrorCode) -> Self
code field.Source§fn ignored_parameters_unsupported(&self) -> Option<&[String]>
fn ignored_parameters_unsupported(&self) -> Option<&[String]>
impl StructuralPartialEq for Response
Auto Trait Implementations§
impl Freeze for Response
impl RefUnwindSafe for Response
impl Send for Response
impl Sync for Response
impl Unpin for Response
impl UnsafeUnpin for Response
impl UnwindSafe for Response
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.