pastebin_rust_api 0.5.14

Library for posting content to pastebin.com
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
/// Represents an Enum of possible access types for pastebin.
pub enum Access {
    Public,
    Unlisted,
    Private,
}

/// method for getting the right string for the `Access` enum.
pub fn get_access(access: &Access) -> &str {
    match access {
        &Access::Public => "0",
        &Access::Unlisted => "1",
        &Access::Private => "2",
    }
}