pub enum DriverCompleteOption {
    NoPrompt,
    Prompt,
    Complete,
    CompleteRequired,
}
Expand description

Specifies how the driver and driver manager complete the incoming connection string. See crate::Environment::driver_connect.

Variants§

§

NoPrompt

Do not show a prompt to the user. This implies that the connection string, must already provide all information needed to Connect to the data source, otherwise the operation fails. This is the only supported variant on non windows platforms

§

Prompt

Always show a prompt to the user.

§

Complete

Only show a prompt to the user if the information in the connection string is not sufficient to connect to the data source.

§

CompleteRequired

Like complete, but the user may not change any information already provided within the connection string.

Implementations§

Examples found in repository?
src/environment.rs (line 417)
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
    pub unsafe fn driver_connect_with_hwnd(
        &self,
        connection_string: &str,
        completed_connection_string: &mut OutputStringBuffer,
        driver_completion: DriverCompleteOption,
        parent_window: HWnd,
    ) -> Result<Connection<'_>, Error> {
        let mut connection = self.allocate_connection()?;
        let connection_string = SqlText::new(connection_string);

        let connection_string_is_complete = connection
            .driver_connect(
                &connection_string,
                parent_window,
                completed_connection_string,
                driver_completion.as_sys(),
            )
            .into_result_bool(&connection)?;
        if !connection_string_is_complete {
            return Err(Error::AbortedConnectionStringCompletion);
        }
        Ok(Connection::new(connection))
    }

Auto Trait Implementations§

Blanket Implementations§

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.