Debian Codegraph @

third_party/rust/cubeb/src/context.rs

raw
1 use std::ffi::CString;
2 use {Context, Result};
3
4 /// Initialize a new cubeb [`Context`]
5 pub fn init<T: Into<Vec<u8>>>(name: T) -> Result<Context> {
6 let name = CString::new(name)?;
7
8 Context::init(Some(name.as_c_str()), None)
9 }