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

Method fmt

crates/cudnn/src/error.rs:75–81  ·  view source on GitHub ↗
(&self, f: &mut std::fmt::Formatter<'_>)

Source from the content-addressed store, hash-verified

73
74impl Display for CudnnError {
75 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
76 unsafe {
77 let ptr = sys::cudnnGetErrorString(self.into_raw());
78 let cow = CStr::from_ptr(ptr).to_string_lossy();
79 f.write_str(cow.as_ref())
80 }
81 }
82}
83
84impl Error for CudnnError {}

Callers

nothing calls this directly

Calls 2

into_rawMethod · 0.45
as_refMethod · 0.45

Tested by

no test coverage detected