Gets the list of projects in this project. NOTE: If projects have not been pulled, they will be pulled upon calling this.
(&self)
| 266 | /// |
| 267 | /// NOTE: If projects have not been pulled, they will be pulled upon calling this. |
| 268 | pub fn projects(&self) -> Result<Array<RemoteProject>, ()> { |
| 269 | if !self.has_pulled_projects() { |
| 270 | self.pull_projects()?; |
| 271 | } |
| 272 | |
| 273 | let mut count = 0; |
| 274 | let value = unsafe { BNRemoteGetProjects(self.handle.as_ptr(), &mut count) }; |
| 275 | if value.is_null() { |
| 276 | return Err(()); |
| 277 | } |
| 278 | Ok(unsafe { Array::new(value, count, ()) }) |
| 279 | } |
| 280 | |
| 281 | /// Gets a specific project in the Remote by its id. |
| 282 | /// |
nothing calls this directly
no test coverage detected