pub struct PushDevice { /* private fields */ }Expand description
Represents the details of a push device with the push account ID as the key.
Modified from openapi-generator-cli output:
$ openapi-generator-cli generate -g rust -i ./zerver/openapi/zulip.yaml -o zulip-openapi --skip-validate-spec/*
* Zulip REST API
*
* Powerful open source group chat
*
* The version of the OpenAPI document: 1.0.0
*
* Generated by: https://openapi-generator.tech
*/See zerver/openapi/zulip.yaml for the original OpenAPI configuration.
Configuration slightly modified to work with the Rust generator of openapi-generator-cli.
Implementations§
Source§impl PushDevice
impl PushDevice
Sourcepub fn new() -> Self
pub fn new() -> Self
Creates a new PushDevice.
Source§impl PushDevice
impl PushDevice
Sourcepub const fn status(&self) -> Option<PushDeviceStatus>
pub const fn status(&self) -> Option<PushDeviceStatus>
Gets the PushDevice status.
The push account’s registration status.
Sourcepub fn set_status(&mut self, val: PushDeviceStatus)
pub fn set_status(&mut self, val: PushDeviceStatus)
Sets the PushDevice status.
The push account’s registration status.
Sourcepub fn unset_status(&mut self) -> Option<PushDeviceStatus>
pub fn unset_status(&mut self) -> Option<PushDeviceStatus>
Unsets the PushDevice status.
The push account’s registration status.
Sourcepub fn with_status(self, val: PushDeviceStatus) -> Self
pub fn with_status(self, val: PushDeviceStatus) -> Self
Builder function that sets the PushDevice status.
The push account’s registration status.
Source§impl PushDevice
impl PushDevice
Sourcepub fn error_code(&self) -> Option<&str>
pub fn error_code(&self) -> Option<&str>
Gets the PushDevice error_code.
If the status is \"failed\", a Zulip API error code indicating the type of failure that occurred.
The following error codes have recommended client behavior:
-
\"INVALID_BOUNCER_PUBLIC_KEY\": Inform the user to update app. -
\"REQUEST_EXPIRED: Retry with a fresh payload.
Sourcepub fn set_error_code<'a, C: Into<Cow<'a, str>>>(&mut self, val: C)
pub fn set_error_code<'a, C: Into<Cow<'a, str>>>(&mut self, val: C)
Sets the PushDevice error_code.
If the status is \"failed\", a Zulip API error code indicating the type of failure that occurred.
The following error codes have recommended client behavior:
-
\"INVALID_BOUNCER_PUBLIC_KEY\": Inform the user to update app. -
\"REQUEST_EXPIRED: Retry with a fresh payload.
Sourcepub fn unset_error_code(&mut self) -> Option<String>
pub fn unset_error_code(&mut self) -> Option<String>
Unsets the PushDevice error_code.
If the status is \"failed\", a Zulip API error code indicating the type of failure that occurred.
The following error codes have recommended client behavior:
-
\"INVALID_BOUNCER_PUBLIC_KEY\": Inform the user to update app. -
\"REQUEST_EXPIRED: Retry with a fresh payload.
Sourcepub fn with_error_code<'a, C: Into<Cow<'a, str>>>(self, val: C) -> Self
pub fn with_error_code<'a, C: Into<Cow<'a, str>>>(self, val: C) -> Self
Builder function that sets the PushDevice error_code.
If the status is \"failed\", a Zulip API error code indicating the type of failure that occurred.
The following error codes have recommended client behavior:
-
\"INVALID_BOUNCER_PUBLIC_KEY\": Inform the user to update app. -
\"REQUEST_EXPIRED: Retry with a fresh payload.