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

Method current_user

rust/src/collaboration/remote.rs:708–714  ·  view source on GitHub ↗

Retrieves the user object for the currently connected user. NOTE: If users have not been pulled, they will be pulled upon calling this. NOTE: This function is only available to accounts with admin status on the Remote

(&self)

Source from the content-addressed store, hash-verified

706 ///
707 /// NOTE: This function is only available to accounts with admin status on the Remote
708 pub fn current_user(&self) -> Result<Option<Ref<RemoteUser>>, ()> {
709 if !self.has_pulled_users() {
710 self.pull_users()?;
711 }
712 let value = unsafe { BNRemoteGetCurrentUser(self.handle.as_ptr()) };
713 Ok(NonNull::new(value).map(|handle| unsafe { RemoteUser::ref_from_raw(handle) }))
714 }
715
716 /// Searches for users in the project with a given prefix.
717 ///

Callers

nothing calls this directly

Calls 3

mapMethod · 0.80
has_pulled_usersMethod · 0.45
pull_usersMethod · 0.45

Tested by

no test coverage detected