[][src]Function twitchchat::sync::register

pub fn register<W: ?Sized + Write>(
    user_config: &UserConfig,
    writer: &mut W
) -> Result<()>

Write the provided UserConfig to the sync writer

Example

let config = UserConfig::builder().anonymous().build().unwrap();

let mut writer = vec![];
register(&config, &mut writer).unwrap();

assert_eq!(
    std::str::from_utf8(&writer).unwrap(),
    "PASS justinfan1234\r\nNICK justinfan1234\r\n"
);