binaryninja::download

Trait CustomDownloadInstance

source
pub trait CustomDownloadInstance: Sized {
    // Required methods
    fn from_core(core: Ref<DownloadInstance>) -> Self;
    fn handle(&self) -> Ref<DownloadInstance>;
    fn perform_custom_request<I>(
        &self,
        method: &str,
        url: &str,
        headers: I,
    ) -> Result<DownloadResponse, String>
       where I: IntoIterator<Item = (String, String)>;

    // Provided methods
    fn new_with_provider(
        provider: DownloadProvider,
    ) -> Result<Ref<DownloadInstance>, ()> { ... }
    fn perform_request(&self, url: &str) -> Result<(), String> { ... }
}

Required Methods§

source

fn from_core(core: Ref<DownloadInstance>) -> Self

Construct the object now that the core object has been created.

source

fn handle(&self) -> Ref<DownloadInstance>

Get the core object, typically the handle is stored directly on the object.

source

fn perform_custom_request<I>( &self, method: &str, url: &str, headers: I, ) -> Result<DownloadResponse, String>
where I: IntoIterator<Item = (String, String)>,

Send an HTTP request on behalf of the caller.

The caller will expect you to inform them of progress via the following:

Provided Methods§

source

fn new_with_provider( provider: DownloadProvider, ) -> Result<Ref<DownloadInstance>, ()>

source

fn perform_request(&self, url: &str) -> Result<(), String>

Send an HTTP request on behalf of the caller.

The caller will expect you to inform them of progress via the following:

Object Safety§

This trait is not object safe.

Implementors§