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)
| 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 | /// |
nothing calls this directly
no test coverage detected