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

Method from_data

rust/src/binary_view.rs:1908–1918  ·  view source on GitHub ↗
(meta: &FileMetadata, data: &[u8])

Source from the content-addressed store, hash-verified

1906 }
1907
1908 pub fn from_data(meta: &FileMetadata, data: &[u8]) -> Result<Ref<Self>> {
1909 let handle = unsafe {
1910 BNCreateBinaryDataViewFromData(meta.handle, data.as_ptr() as *mut _, data.len())
1911 };
1912
1913 if handle.is_null() {
1914 return Err(());
1915 }
1916
1917 unsafe { Ok(Ref::new(Self { handle })) }
1918 }
1919
1920 /// Save the original binary file to the provided `file_path` along with any modifications.
1921 ///

Callers

nothing calls this directly

Calls 1

lenMethod · 0.45

Tested by

no test coverage detected