(&self, path: S)
| 53 | } |
| 54 | |
| 55 | pub fn plugin_by_path<S: BnStrCompatible>(&self, path: S) -> Option<Ref<RepositoryPlugin>> { |
| 56 | let path = path.into_bytes_with_nul(); |
| 57 | let result = unsafe { |
| 58 | BNRepositoryGetPluginByPath( |
| 59 | self.handle.as_ptr(), |
| 60 | path.as_ref().as_ptr() as *const c_char, |
| 61 | ) |
| 62 | }; |
| 63 | NonNull::new(result).map(|h| unsafe { RepositoryPlugin::ref_from_raw(h) }) |
| 64 | } |
| 65 | |
| 66 | // TODO: Make this a PathBuf? |
| 67 | /// String full path the repository |