pub struct PostgresInstanceConfigResponse {
pub pg_bouncer_config: Option<PgBouncerConfigResponse>,
pub pg_config: Option<PgConfigResponse>,
}Expand description
postgresInstanceConfig from the ClickHouse Cloud API, in response
position.
Response variant of PostgresInstanceConfig: every field is Option<T>,
so a field the API drops or sends as null deserializes to None instead
of failing. Writing a fetched configuration back to the API goes through
TryFrom<PostgresInstanceConfigResponse> (see crate::convert), which
forces every absent required field to be resolved explicitly.
Fields§
§pg_bouncer_config: Option<PgBouncerConfigResponse>§pg_config: Option<PgConfigResponse>Trait Implementations§
Source§impl Clone for PostgresInstanceConfigResponse
impl Clone for PostgresInstanceConfigResponse
Source§fn clone(&self) -> PostgresInstanceConfigResponse
fn clone(&self) -> PostgresInstanceConfigResponse
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 Default for PostgresInstanceConfigResponse
impl Default for PostgresInstanceConfigResponse
Source§fn default() -> PostgresInstanceConfigResponse
fn default() -> PostgresInstanceConfigResponse
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for PostgresInstanceConfigResponse
impl<'de> Deserialize<'de> for PostgresInstanceConfigResponse
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
impl StructuralPartialEq for PostgresInstanceConfigResponse
Source§impl TryFrom<PostgresInstanceConfigResponse> for PostgresInstanceConfig
impl TryFrom<PostgresInstanceConfigResponse> for PostgresInstanceConfig
Source§fn try_from(value: PostgresInstanceConfigResponse) -> Result<Self, Self::Error>
fn try_from(value: PostgresInstanceConfigResponse) -> Result<Self, Self::Error>
Turns a fetched configuration into a POST/PATCH body.
The API requires both pgConfig and pgBouncerConfig in a write body
(it rejects a body omitting either), so a response missing one cannot be
written back verbatim and the caller has to supply it.
Source§type Error = MissingRequiredFields
type Error = MissingRequiredFields
The type returned in the event of a conversion error.
Auto Trait Implementations§
impl Freeze for PostgresInstanceConfigResponse
impl RefUnwindSafe for PostgresInstanceConfigResponse
impl Send for PostgresInstanceConfigResponse
impl Sync for PostgresInstanceConfigResponse
impl Unpin for PostgresInstanceConfigResponse
impl UnsafeUnpin for PostgresInstanceConfigResponse
impl UnwindSafe for PostgresInstanceConfigResponse
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