(
&self,
key: S,
options: &mut QueryOptions,
)
| 189 | } |
| 190 | |
| 191 | pub fn get_string_with_opts<S: BnStrCompatible>( |
| 192 | &self, |
| 193 | key: S, |
| 194 | options: &mut QueryOptions, |
| 195 | ) -> BnString { |
| 196 | let key = key.into_bytes_with_nul(); |
| 197 | let view_ptr = match options.view.as_ref() { |
| 198 | Some(view) => view.handle, |
| 199 | _ => std::ptr::null_mut(), |
| 200 | }; |
| 201 | let func_ptr = match options.function.as_ref() { |
| 202 | Some(func) => func.handle, |
| 203 | _ => std::ptr::null_mut(), |
| 204 | }; |
| 205 | unsafe { |
| 206 | BnString::from_raw(BNSettingsGetString( |
| 207 | self.handle, |
| 208 | key.as_ref().as_ptr() as *mut _, |
| 209 | view_ptr, |
| 210 | func_ptr, |
| 211 | &mut options.scope, |
| 212 | )) |
| 213 | } |
| 214 | } |
| 215 | |
| 216 | pub fn get_string_list<S: BnStrCompatible>(&self, key: S) -> Array<BnString> { |
| 217 | self.get_string_list_with_opts(key, &mut QueryOptions::default()) |
no test coverage detected