[][src]Function tweetr::ops::add_user::print_success_message

pub fn print_success_message<W: Write>(
    output: &mut W,
    user: &User,
    verbose: bool
)

Print the success message mentioning the specified user's name and ID, optionally also mentioning tokens.

Examples

let mut out = Vec::new();
add_user::print_success_message(&mut out, &User {
    name: "random-test-name".to_string(),
    id: 0x42069,
    access_token_key: "270441-N48kdEQFWtj7cUyWomNeE2AsNQw8pnmOaQbcwnV".to_string(),
    access_token_secret: "jCcBthGzve36QMt3RAV6jOEg4qtHt7laMV2YFA3qKCRzw".to_string(),
}, false);
assert_eq!(out, Vec::from_iter(b"Successfully authenticated user random-test-name#270441\n".iter().cloned()));