pub struct DatabaseTemplate { /* private fields */ }Expand description
Immutable initialized database that can be cloned for individual tests.
Implementations§
Source§impl DatabaseTemplate
impl DatabaseTemplate
pub fn database_name(&self) -> &str
pub fn fingerprint(&self) -> TemplateFingerprint
pub async fn database(&self) -> Result<DatabaseLease>
Sourcepub async fn prewarm(&self, capacity: usize) -> Result<PrewarmedDatabasePool>
pub async fn prewarm(&self, capacity: usize) -> Result<PrewarmedDatabasePool>
Creates and fills an opt-in bounded queue of pristine disposable databases.
Idle databases retain this template’s shared lock but consume no downstream connection permits. The capacity may not exceed the harness’s effective simultaneous-lease limit. Every leased database is dropped after use; the background lifecycle queue creates a distinct replacement rather than reusing dirty state.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for DatabaseTemplate
impl RefUnwindSafe for DatabaseTemplate
impl Send for DatabaseTemplate
impl Sync for DatabaseTemplate
impl Unpin for DatabaseTemplate
impl UnsafeUnpin for DatabaseTemplate
impl UnwindSafe for DatabaseTemplate
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
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