Gets the list of groups in this project. If groups have not been pulled, they will be pulled upon calling this. This function is only available to accounts with admin status on the Remote.
(&self)
| 443 | /// If groups have not been pulled, they will be pulled upon calling this. |
| 444 | /// This function is only available to accounts with admin status on the Remote. |
| 445 | pub fn groups(&self) -> Result<Array<RemoteGroup>, ()> { |
| 446 | if !self.has_pulled_groups() { |
| 447 | self.pull_groups()?; |
| 448 | } |
| 449 | |
| 450 | let mut count = 0; |
| 451 | let value = unsafe { BNRemoteGetGroups(self.handle.as_ptr(), &mut count) }; |
| 452 | if value.is_null() { |
| 453 | return Err(()); |
| 454 | } |
| 455 | Ok(unsafe { Array::new(value, count, ()) }) |
| 456 | } |
| 457 | |
| 458 | /// Gets a specific group in the Remote by its id. |
| 459 | /// |
nothing calls this directly
no test coverage detected