MCPcopy Create free account
hub / github.com/Rust-GPU/rust-cuda / from_str

Method from_str

crates/cust/src/module.rs:299–304  ·  view source on GitHub ↗
(string: T)

Source from the content-addressed store, hash-verified

297 )]
298 #[allow(clippy::should_implement_trait)]
299 pub fn from_str<T: AsRef<str>>(string: T) -> CudaResult<Module> {
300 let cstr = CString::new(string.as_ref())
301 .expect("string given to Module::from_str contained nul bytes");
302 #[allow(deprecated)]
303 Self::load_from_string(cstr.as_c_str())
304 }
305
306 /// Load a module from a CStr.
307 ///

Callers

nothing calls this directly

Calls 3

newFunction · 0.85
expectMethod · 0.45
as_refMethod · 0.45

Tested by

no test coverage detected