pub struct IdentifyProperties {
pub os: CompactString,
pub browser: CompactString,
pub device: CompactString,
}Expand description
The connection properties
sent in Identify.
discord.js counterpart: GatewayIdentifyProperties (discord-api-types).
Fields§
§os: CompactStringThe operating system, e.g. linux.
browser: CompactStringThe library name.
device: CompactStringThe library name.
Implementations§
Source§impl IdentifyProperties
impl IdentifyProperties
Sourcepub fn new(library: &str) -> Self
pub fn new(library: &str) -> Self
Creates properties with the given library name and the current operating system
(std::env::consts::OS).
discord.js counterpart: the identifyProperties option of WebSocketManagerOptions (@discordjs/ws).
§Examples
use djs_model::gateway::payload::IdentifyProperties;
let properties = IdentifyProperties::new("djs-rs");
assert_eq!(properties.browser, "djs-rs");
assert_eq!(properties.os, std::env::consts::OS);Trait Implementations§
Source§impl Clone for IdentifyProperties
impl Clone for IdentifyProperties
Source§impl Debug for IdentifyProperties
impl Debug for IdentifyProperties
impl Eq for IdentifyProperties
Source§impl PartialEq for IdentifyProperties
impl PartialEq for IdentifyProperties
Source§impl Serialize for IdentifyProperties
impl Serialize for IdentifyProperties
impl StructuralPartialEq for IdentifyProperties
Auto Trait Implementations§
impl Freeze for IdentifyProperties
impl RefUnwindSafe for IdentifyProperties
impl Send for IdentifyProperties
impl Sync for IdentifyProperties
impl Unpin for IdentifyProperties
impl UnsafeUnpin for IdentifyProperties
impl UnwindSafe for IdentifyProperties
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
Mutably borrows from an owned value. Read more