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

Function get_remote_for_local_database

rust/src/collaboration/sync.rs:139–146  ·  view source on GitHub ↗

Get the Remote for a Database

(database: &Database)

Source from the content-addressed store, hash-verified

137
138/// Get the Remote for a Database
139pub fn get_remote_for_local_database(database: &Database) -> Result<Option<Ref<Remote>>, ()> {
140 let mut value = std::ptr::null_mut();
141 let success =
142 unsafe { BNCollaborationGetRemoteForLocalDatabase(database.handle.as_ptr(), &mut value) };
143 success
144 .then(|| NonNull::new(value).map(|handle| unsafe { Remote::ref_from_raw(handle) }))
145 .ok_or(())
146}
147
148/// Get the Remote for a BinaryView
149pub fn get_remote_for_binary_view(bv: &BinaryView) -> Result<Option<Ref<Remote>>, ()> {

Callers 3

pull_projectsFunction · 0.70

Calls 1

mapMethod · 0.80

Tested by

no test coverage detected