pub struct CaproniConfig {
pub version: i32,
pub cluster: ClusterConfig,
pub repositories: Option<OrderedMap<String, RepositoryConfig>>,
pub deployers: Option<OrderedMap<String, DeployerConfig>>,
pub reloaders: Option<OrderedMap<String, ReloaderConfig>>,
pub variables: Option<OrderedMap<String, VariableConfig>>,
pub config_file: String,
pub config_dir: String,
pub copy_sleep_image: String,
}Fields§
§version: i32§cluster: ClusterConfig§repositories: Option<OrderedMap<String, RepositoryConfig>>§deployers: Option<OrderedMap<String, DeployerConfig>>§reloaders: Option<OrderedMap<String, ReloaderConfig>>§variables: Option<OrderedMap<String, VariableConfig>>§config_file: String§config_dir: String§copy_sleep_image: StringImplementations§
Source§impl CaproniConfig
impl CaproniConfig
Sourcepub fn apply_defaults(&mut self) -> Result<(), LatestError>
pub fn apply_defaults(&mut self) -> Result<(), LatestError>
Applies schema-defined defaults to optional fields.
Sourcepub fn resolve_path(&self, path: &str) -> String
pub fn resolve_path(&self, path: &str) -> String
Resolves a path relative to the configuration file directory. If the path is already absolute, it is returned unchanged.
Trait Implementations§
Source§impl Clone for CaproniConfig
impl Clone for CaproniConfig
Source§fn clone(&self) -> CaproniConfig
fn clone(&self) -> CaproniConfig
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 CaproniConfig
impl Debug for CaproniConfig
Source§impl Default for CaproniConfig
impl Default for CaproniConfig
Source§fn default() -> CaproniConfig
fn default() -> CaproniConfig
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for CaproniConfigwhere
CaproniConfig: Default,
impl<'de> Deserialize<'de> for CaproniConfigwhere
CaproniConfig: Default,
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
Source§impl Serialize for CaproniConfig
impl Serialize for CaproniConfig
Source§impl Upgrader for CaproniConfig
impl Upgrader for CaproniConfig
Source§fn upgrade(&self) -> Result<Box<dyn Upgrader>, UpgraderError>
fn upgrade(&self) -> Result<Box<dyn Upgrader>, UpgraderError>
The terminal no-op: latest is already the newest schema. There is no
Rust equivalent of the Go original’s pointer-identity termination
signal (see PORT_NOTES.md); this clones self into a fresh box, and
callers must use is_terminal/a version check rather than identity to
detect convergence.
Source§fn is_terminal(&self) -> bool
fn is_terminal(&self) -> bool
latest is always the terminal version, so this is always true.
See versions::Upgrader::is_terminal for why this replaces the Go
original’s pointer-identity termination signal.
Source§fn as_any(&self) -> &dyn Any
fn as_any(&self) -> &dyn Any
Exposes
self as &dyn Any, so a caller holding a Box<dyn Upgrader> at the end of an upgrade walk can downcast back to the
concrete type it expects — the Rust equivalent of the Go original’s
upgraded.(*latest.CaproniConfig) type assertion, since Rust trait
objects need an explicit escape hatch (there is no built-in upcast
from dyn Upgrader to dyn Any without this).Auto Trait Implementations§
impl Freeze for CaproniConfig
impl RefUnwindSafe for CaproniConfig
impl Send for CaproniConfig
impl Sync for CaproniConfig
impl Unpin for CaproniConfig
impl UnsafeUnpin for CaproniConfig
impl UnwindSafe for CaproniConfig
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