MCPcopy Create free account
hub / github.com/Vector35/binaryninja-api / by_name

Method by_name

rust/src/custom_binary_view.rs:362–369  ·  view source on GitHub ↗

Looks up a BinaryViewType by its short name

(name: N)

Source from the content-addressed store, hash-verified

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
372impl BinaryViewTypeBase for BinaryViewType {

Callers

nothing calls this directly

Calls 2

into_bytes_with_nulMethod · 0.80
as_refMethod · 0.45

Tested by

no test coverage detected