rust-discord-activity 0.2.0

A lightweight library to control Discord Rich Presence
Documentation
use std::borrow::Cow;
use std::fmt;
use std::fmt::{Display, Formatter};

/// Custom Error list for the library.
pub enum Error {
    DiscordNotFound,
}

impl Display for Error {
    fn fmt(&self, f: &mut Formatter) -> fmt::Result {
        let msg = match self {
            Error::DiscordNotFound => {
                Cow::Borrowed("Could not connect to client. Is Discord running ?")
            }
        };

        f.write_str(&msg)
    }
}