MCPcopy Create free account
hub / github.com/Vector35/binaryninja-api / update_with_progress

Method update_with_progress

rust/src/update.rs:170–192  ·  view source on GitHub ↗
(
        &self,
        version: &UpdateVersion,
        mut progress: P,
    )

Source from the content-addressed store, hash-verified

168 }
169
170 pub fn update_with_progress<P: ProgressCallback>(
171 &self,
172 version: &UpdateVersion,
173 mut progress: P,
174 ) -> Result<UpdateResult, BnString> {
175 let mut errors = std::ptr::null_mut();
176
177 let result = unsafe {
178 BNUpdateToVersion(
179 self.name.as_ptr() as *const c_char,
180 version.version.as_ptr() as *const c_char,
181 &mut errors,
182 Some(P::cb_progress_callback),
183 &mut progress as *mut P as *mut c_void,
184 )
185 };
186
187 if !errors.is_null() {
188 Err(unsafe { BnString::from_raw(errors) })
189 } else {
190 Ok(result)
191 }
192 }
193}
194
195impl CoreArrayProvider for UpdateChannel {

Callers 1

updateMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected