pub struct Definition {
pub instance_name: InstanceName,
pub application_name: Option<ApplicationName>,
pub backend: Backend,
pub database: Database,
pub seeds: IndexMap<SeedName, Seed>,
pub ssl_config: Option<SslConfig>,
pub superuser: User,
pub image: Image,
pub cross_container_access: bool,
pub wait_available_timeout: Duration,
pub remove: bool,
}Fields§
§instance_name: InstanceName§application_name: Option<ApplicationName>§backend: Backend§database: Database§seeds: IndexMap<SeedName, Seed>§ssl_config: Option<SslConfig>§superuser: User§image: Image§cross_container_access: bool§wait_available_timeout: Duration§remove: boolImplementations§
Source§impl Definition
impl Definition
pub fn new(backend: Backend, image: Image, instance_name: InstanceName) -> Self
pub fn remove(self, remove: bool) -> Self
pub fn image(self, image: Image) -> Self
pub fn add_seed( self, name: SeedName, seed: Seed, ) -> Result<Self, DuplicateSeedName>
pub fn apply_file( self, name: SeedName, path: PathBuf, ) -> Result<Self, DuplicateSeedName>
pub async fn load_seeds( &self, instance_name: &InstanceName, ) -> Result<LoadedSeeds<'_>, LoadError>
pub async fn print_cache_status( &self, instance_name: &InstanceName, json: bool, ) -> Result<(), Error>
pub fn superuser(self, user: User) -> Self
pub fn apply_file_from_git_revision( self, name: SeedName, path: PathBuf, git_revision: impl Into<String>, ) -> Result<Self, DuplicateSeedName>
pub fn apply_command( self, name: SeedName, command: Command, cache: CommandCacheConfig, ) -> Result<Self, DuplicateSeedName>
pub fn apply_script( self, name: SeedName, script: impl Into<String>, ) -> Result<Self, DuplicateSeedName>
pub fn apply_container_script( self, name: SeedName, script: impl Into<String>, ) -> Result<Self, DuplicateSeedName>
pub fn ssl_config(self, ssl_config: SslConfig) -> Self
pub fn cross_container_access(self, enabled: bool) -> Self
pub fn wait_available_timeout(self, timeout: Duration) -> Self
pub fn to_ociman_definition(&self) -> Definition
pub async fn with_container<T>( &self, action: impl AsyncFnMut(&Container) -> T, ) -> Result<T, Error>
Sourcepub async fn populate_cache(
&self,
instance_name: &InstanceName,
) -> Result<(Option<Reference>, Vec<LoadedSeed>), Error>
pub async fn populate_cache( &self, instance_name: &InstanceName, ) -> Result<(Option<Reference>, Vec<LoadedSeed>), Error>
Populate cache images for seeds.
Returns a tuple of:
- The last cache hit reference (if any), which can be used to boot from
- The loaded seeds that could not be cached because the cache chain was broken
pub async fn run_integration_server( &self, result_fd: RawFd, control_fd: RawFd, ) -> Result<(), Error>
pub async fn schema_dump( &self, client_config: &Config, pg_schema_dump: &PgSchemaDump, ) -> String
Trait Implementations§
Source§impl Clone for Definition
impl Clone for Definition
Source§fn clone(&self) -> Definition
fn clone(&self) -> Definition
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for Definition
impl Debug for Definition
Source§impl PartialEq for Definition
impl PartialEq for Definition
impl StructuralPartialEq for Definition
Auto Trait Implementations§
impl Freeze for Definition
impl RefUnwindSafe for Definition
impl Send for Definition
impl Sync for Definition
impl Unpin for Definition
impl UnsafeUnpin for Definition
impl UnwindSafe for Definition
Blanket Implementations§
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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 more