(&self, path: P)
| 78 | } |
| 79 | |
| 80 | pub fn repository_by_path<P: BnStrCompatible>(&self, path: P) -> Option<Repository> { |
| 81 | let path = path.into_bytes_with_nul(); |
| 82 | let result = unsafe { |
| 83 | BNRepositoryGetRepositoryByPath( |
| 84 | self.handle.as_ptr(), |
| 85 | path.as_ref().as_ptr() as *const c_char, |
| 86 | ) |
| 87 | }; |
| 88 | NonNull::new(result).map(|raw| unsafe { Repository::from_raw(raw) }) |
| 89 | } |
| 90 | |
| 91 | /// Gets the default [`Repository`] |
| 92 | pub fn default_repository(&self) -> Ref<Repository> { |