pub struct OliphauntServerBuilder { /* private fields */ }Expand description
Builder for OliphauntServer.
Implementations§
Source§impl OliphauntServerBuilder
impl OliphauntServerBuilder
Sourcepub fn path(self, root: impl Into<PathBuf>) -> Self
pub fn path(self, root: impl Into<PathBuf>) -> Self
Serve a persistent database rooted at root.
Sourcepub fn temporary(self) -> Self
pub fn temporary(self) -> Self
Serve a temporary database cloned from the process-local template cache.
Sourcepub fn fresh_temporary(self) -> Self
pub fn fresh_temporary(self) -> Self
Serve a temporary database initialized without the template cache.
This is a compatibility alias for the pre-template-cache public API.
Fresh initdb uses the bundled split WASIX initdb module; cached
temporary databases remain the production fast path.
Sourcepub fn tcp(self, addr: SocketAddr) -> Self
pub fn tcp(self, addr: SocketAddr) -> Self
Bind the server to a TCP address.
Sourcepub fn unix(self, path: impl Into<PathBuf>) -> Self
pub fn unix(self, path: impl Into<PathBuf>) -> Self
Bind the server to a Unix-domain socket path.
Sourcepub fn postgres_config(
self,
name: impl Into<String>,
value: impl Into<String>,
) -> Self
pub fn postgres_config( self, name: impl Into<String>, value: impl Into<String>, ) -> Self
Set a PostgreSQL startup GUC for the embedded backend used by this server.
Sourcepub fn postgres_configs<K, V>(
self,
settings: impl IntoIterator<Item = (K, V)>,
) -> Self
pub fn postgres_configs<K, V>( self, settings: impl IntoIterator<Item = (K, V)>, ) -> Self
Set multiple PostgreSQL startup GUCs for the embedded backend used by this server.
Sourcepub fn username(self, username: impl Into<String>) -> Self
pub fn username(self, username: impl Into<String>) -> Self
Default user encoded in OliphauntServer::database_url.
Sourcepub fn database(self, database: impl Into<String>) -> Self
pub fn database(self, database: impl Into<String>) -> Self
Default database encoded in OliphauntServer::database_url.
Sourcepub fn debug_level(self, level: DebugLevel) -> Self
pub fn debug_level(self, level: DebugLevel) -> Self
Enable PostgreSQL debug logging level 0..=5 for server backends.
Sourcepub fn relaxed_durability(self, enabled: bool) -> Self
pub fn relaxed_durability(self, enabled: bool) -> Self
Use lower durability settings for ephemeral or cacheable local workloads.
Sourcepub fn startup_arg(self, arg: impl Into<String>) -> Self
pub fn startup_arg(self, arg: impl Into<String>) -> Self
Append an advanced PostgreSQL startup argument for server backends.
Sourcepub fn startup_args(
self,
args: impl IntoIterator<Item = impl Into<String>>,
) -> Self
pub fn startup_args( self, args: impl IntoIterator<Item = impl Into<String>>, ) -> Self
Append advanced PostgreSQL startup arguments for server backends.
Sourcepub fn start(self) -> Result<OliphauntServer>
pub fn start(self) -> Result<OliphauntServer>
Install the runtime if needed, initialize the cluster, and start serving.
Trait Implementations§
Source§impl Clone for OliphauntServerBuilder
impl Clone for OliphauntServerBuilder
Source§fn clone(&self) -> OliphauntServerBuilder
fn clone(&self) -> OliphauntServerBuilder
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for OliphauntServerBuilder
impl Debug for OliphauntServerBuilder
Auto Trait Implementations§
impl Freeze for OliphauntServerBuilder
impl RefUnwindSafe for OliphauntServerBuilder
impl Send for OliphauntServerBuilder
impl Sync for OliphauntServerBuilder
impl Unpin for OliphauntServerBuilder
impl UnsafeUnpin for OliphauntServerBuilder
impl UnwindSafe for OliphauntServerBuilder
Blanket Implementations§
Source§impl<T> ArchivePointee for T
impl<T> ArchivePointee for T
Source§type ArchivedMetadata = ()
type ArchivedMetadata = ()
Source§fn pointer_metadata(
_: &<T as ArchivePointee>::ArchivedMetadata,
) -> <T as Pointee>::Metadata
fn pointer_metadata( _: &<T as ArchivePointee>::ArchivedMetadata, ) -> <T as Pointee>::Metadata
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
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>
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>
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> LayoutRaw for T
impl<T> LayoutRaw for T
Source§fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
Source§impl<T, N1, N2> Niching<NichedOption<T, N1>> for N2
impl<T, N1, N2> Niching<NichedOption<T, N1>> for N2
Source§unsafe fn is_niched(niched: *const NichedOption<T, N1>) -> bool
unsafe fn is_niched(niched: *const NichedOption<T, N1>) -> bool
Source§fn resolve_niched(out: Place<NichedOption<T, N1>>)
fn resolve_niched(out: Place<NichedOption<T, N1>>)
out indicating that a T is niched.