Struct titanium::desktop::discord::DiscordRPCClient
pub struct DiscordRPCClient {
pub client_id: String,
/* private fields */
}
Expand description
A wrapper struct for the functionality contained in the
underlying DiscordIpc
trait.
Fields§
§client_id: String
Client ID of the IPC client.
Implementations§
§impl DiscordRPCClient
impl DiscordRPCClient
Trait Implementations§
§impl Debug for DiscordRPCClient
impl Debug for DiscordRPCClient
§impl DiscordIpc for DiscordRPCClient
impl DiscordIpc for DiscordRPCClient
§fn close(&mut self) -> Result<(), Box<dyn Error + 'static, Global>>
fn close(&mut self) -> Result<(), Box<dyn Error + 'static, Global>>
Closes the Discord IPC connection. Implementation is dependent on platform.
§fn connect(&mut self) -> Result<(), Box<dyn Error + 'static, Global>>
fn connect(&mut self) -> Result<(), Box<dyn Error + 'static, Global>>
Connects the client to the Discord IPC. Read more
§fn reconnect(&mut self) -> Result<(), Box<dyn Error + 'static, Global>>
fn reconnect(&mut self) -> Result<(), Box<dyn Error + 'static, Global>>
Reconnects to the Discord IPC. Read more
§fn send_handshake(&mut self) -> Result<(), Box<dyn Error + 'static, Global>>
fn send_handshake(&mut self) -> Result<(), Box<dyn Error + 'static, Global>>
Handshakes the Discord IPC. Read more
§fn send(
&mut self,
data: Value,
opcode: u8
) -> Result<(), Box<dyn Error + 'static, Global>>
fn send( &mut self, data: Value, opcode: u8 ) -> Result<(), Box<dyn Error + 'static, Global>>
Sends JSON data to the Discord IPC. Read more
§fn recv(&mut self) -> Result<(u32, Value), Box<dyn Error + 'static, Global>>
fn recv(&mut self) -> Result<(u32, Value), Box<dyn Error + 'static, Global>>
Receives an opcode and JSON data from the Discord IPC. Read more
§fn set_activity(
&mut self,
activity_payload: Activity<'_>
) -> Result<(), Box<dyn Error + 'static, Global>>
fn set_activity( &mut self, activity_payload: Activity<'_> ) -> Result<(), Box<dyn Error + 'static, Global>>
Sets a Discord activity. Read more
§fn clear_activity(&mut self) -> Result<(), Box<dyn Error + 'static, Global>>
fn clear_activity(&mut self) -> Result<(), Box<dyn Error + 'static, Global>>
Works the same as as
set_activity
but clears activity instead. Read moreAuto Trait Implementations§
impl RefUnwindSafe for DiscordRPCClient
impl Send for DiscordRPCClient
impl Sync for DiscordRPCClient
impl Unpin for DiscordRPCClient
impl UnwindSafe for DiscordRPCClient
Blanket Implementations§
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
§impl<T> Pointable for T
impl<T> Pointable for T
§impl<T> RoundFrom<T> for T
impl<T> RoundFrom<T> for T
§fn round_from(x: T) -> T
fn round_from(x: T) -> T
Performs the conversion.
§impl<T, U> RoundInto<U> for Twhere
U: RoundFrom<T>,
impl<T, U> RoundInto<U> for Twhere U: RoundFrom<T>,
§fn round_into(self) -> U
fn round_into(self) -> U
Performs the conversion.