pub struct Database {
pub name: String,
pub enabled: Option<bool>,
pub url: Option<String>,
pub min_pool_size: Option<u32>,
pub max_pool_size: Option<u32>,
pub logging: Option<bool>,
pub aquire_timeout: Option<u64>,
pub max_lifetime: Option<u64>,
pub idle_timeout: Option<u64>,
pub connect_timeout: Option<u64>,
pub logging_level: Option<String>,
}Expand description
Relational database configuration.
Controls connection details, pooling behavior, timeouts, and logging options.
Fields§
§name: StringDatabase connection name.
enabled: Option<bool>Database connection enabled. Default true.
url: Option<String>Database connection URL.
min_pool_size: Option<u32>Minimum number of connections in the pool.
max_pool_size: Option<u32>Maximum number of connections in the pool.
logging: Option<bool>Enables or disables database query logging.
aquire_timeout: Option<u64>Timeout for acquiring a connection from the pool (in seconds).
max_lifetime: Option<u64>Maximum lifetime of a connection (in seconds).
idle_timeout: Option<u64>Maximum idle time of a connection (in seconds).
connect_timeout: Option<u64>Timeout for establishing a new connection (in seconds).
logging_level: Option<String>Logging level used by the database layer.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Database
impl<'de> Deserialize<'de> for Database
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for Database
impl RefUnwindSafe for Database
impl Send for Database
impl Sync for Database
impl Unpin for Database
impl UnsafeUnpin for Database
impl UnwindSafe for Database
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T in a tonic::Request