Add support for authorizer hook (#946)

Co-authored-by: Thom Chiovoloni <chiovolonit@gmail.com>
This commit is contained in:
Nick Hynes
2021-05-23 13:55:07 -05:00
committed by GitHub
parent ba03b34374
commit 48e7561af9
2 changed files with 439 additions and 16 deletions

View File

@@ -33,6 +33,8 @@ pub struct InnerConnection {
pub free_update_hook: Option<unsafe fn(*mut ::std::os::raw::c_void)>,
#[cfg(feature = "hooks")]
pub progress_handler: Option<Box<dyn FnMut() -> bool + Send>>,
#[cfg(feature = "hooks")]
pub authorizer: Option<crate::hooks::BoxedAuthorizer>,
owned: bool,
}
@@ -51,6 +53,8 @@ impl InnerConnection {
free_update_hook: None,
#[cfg(feature = "hooks")]
progress_handler: None,
#[cfg(feature = "hooks")]
authorizer: None,
owned,
}
}