Looks up a BinaryViewType by its short name
(name: N)
| 360 | |
| 361 | /// Looks up a BinaryViewType by its short name |
| 362 | pub fn by_name<N: BnStrCompatible>(name: N) -> Result<Self> { |
| 363 | let bytes = name.into_bytes_with_nul(); |
| 364 | let handle = unsafe { BNGetBinaryViewTypeByName(bytes.as_ref().as_ptr() as *const _) }; |
| 365 | match handle.is_null() { |
| 366 | false => Ok(unsafe { BinaryViewType::from_raw(handle) }), |
| 367 | true => Err(()), |
| 368 | } |
| 369 | } |
| 370 | } |
| 371 | |
| 372 | impl BinaryViewTypeBase for BinaryViewType { |
nothing calls this directly
no test coverage detected