pub trait GlobalHandler: Send + Sync + 'static {
    // Required method
    fn handle(
        &self,
        file_name: &[u8]
    ) -> BoxFuture<'static, Result<InfileData, LocalInfileError>>;
}
Expand description

Global, Opts-level LOCAL INFILE handler (see “LOCAL INFILE Handlers” section of the README.md).

Warning: You should be aware of Security Considerations for LOAD DATA LOCAL.

The purpose of the handler is to emit infile data in response to a file name. This handler will be called if there is no local handler installed for the connection.

The library will call this handler in response to a LOCAL INFILE request from the server. The server, in its turn, will emit LOCAL INFILE requests in response to a LOAD DATA LOCAL queries:

LOAD DATA LOCAL INFILE '<file name>' INTO TABLE <table>;

Required Methods§

source

fn handle( &self, file_name: &[u8] ) -> BoxFuture<'static, Result<InfileData, LocalInfileError>>

Implementors§

source§

impl GlobalHandler for WhiteListFsHandler

source§

impl<T> GlobalHandler for T
where T: for<'a> Fn(&'a [u8]) -> BoxFuture<'static, Result<InfileData, LocalInfileError>> + Send + Sync + 'static,