[][src]Function twitchchat::register

pub async fn register<'_, '_, W: ?Sized>(
    user_config: &'_ UserConfig,
    writer: &'_ mut W
) -> Result<()> where
    W: AsyncWrite + Unpin

Write the provided UserConfig to the async writer

Example

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

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

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