Fork channel

Create a new channel as a copy of main.

Rename channel

Rename main to:

Delete channel

Delete main? This cannot be undone.

error.rs
use std::fmt;

#[derive(Debug)]
pub struct Error(String);

impl fmt::Display for Error {
    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
        write!(f, "{}", self.0)
    }
}

///
pub fn failed_to_parse_json(msg: &str) -> Error {
    Error(format!(
        "[fred_app:01] Failed to parse JSON with error [{}].",
        msg,
    ))
}

///
pub fn failed_http_request(msg: &str) -> Error {
    Error(format!(
        "[fred_api:02]] Http request failed with error [{}].",
        msg,
    ))
}