[−][src]Function twitchchat::sync::register_easy
pub fn register_easy<W: ?Sized + Write>(
name: &str,
token: &str,
writer: &mut W
) -> Result<()>
Write the provided name
and token
to the sync writer
Example
let (name, token) = ("justinfan1234", "justinfan1234"); let mut writer = vec![]; register_easy(&name, &token, &mut writer).unwrap(); assert_eq!( std::str::from_utf8(&writer).unwrap(), "CAP REQ :twitch.tv/membership\r\n\ CAP REQ :twitch.tv/tags\r\n\ CAP REQ :twitch.tv/commands\r\n\ PASS justinfan1234\r\n\ NICK justinfan1234\r\n" );