pub enum MergingUnsetBuilder<T> {
Unset,
Set(T),
}Expand description
Implementation helper for building a type that supports merging in itself, but needs to represent unset.
See MergingWithUnset for more info.
Variants§
Trait Implementations§
Source§impl<T: Clone> Clone for MergingUnsetBuilder<T>
impl<T: Clone> Clone for MergingUnsetBuilder<T>
Source§fn clone(&self) -> MergingUnsetBuilder<T>
fn clone(&self) -> MergingUnsetBuilder<T>
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<T> ConfigurationBuilder for MergingUnsetBuilder<T>where
T: MergingWithUnset + DeserializeOwned,
impl<T> ConfigurationBuilder for MergingUnsetBuilder<T>where
T: MergingWithUnset + DeserializeOwned,
Source§type Target = <T as MergingWithUnset>::Target
type Target = <T as MergingWithUnset>::Target
The target that will be converted into. See
Configuration.Source§fn merge(self, other: Self) -> Self
fn merge(self, other: Self) -> Self
Combines two builders recursively, preferring
self’s data, if present.Source§fn try_build(self) -> Result<Self::Target, Error>
fn try_build(self) -> Result<Self::Target, Error>
This will probably delegate to
TryInto but allows it to be implemented for types foreign
to the library.Source§fn contains_non_secret_data(&self) -> Result<bool, UnexpectedSecret>
fn contains_non_secret_data(&self) -> Result<bool, UnexpectedSecret>
Called recursively on each field, aiming to hit all
SecretBuilders. This is only called
when Source::allows_secrets is false. Read moreSource§impl<T: Debug> Debug for MergingUnsetBuilder<T>
impl<T: Debug> Debug for MergingUnsetBuilder<T>
Source§impl<T> Default for MergingUnsetBuilder<T>
impl<T> Default for MergingUnsetBuilder<T>
Source§fn default() -> MergingUnsetBuilder<T>
fn default() -> MergingUnsetBuilder<T>
Returns the “default value” for a type. Read more
Source§impl<'de, T> Deserialize<'de> for MergingUnsetBuilder<T>where
T: Deserialize<'de>,
impl<'de, T> Deserialize<'de> for MergingUnsetBuilder<T>where
T: Deserialize<'de>,
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
Auto Trait Implementations§
impl<T> Freeze for MergingUnsetBuilder<T>where
T: Freeze,
impl<T> RefUnwindSafe for MergingUnsetBuilder<T>where
T: RefUnwindSafe,
impl<T> Send for MergingUnsetBuilder<T>where
T: Send,
impl<T> Sync for MergingUnsetBuilder<T>where
T: Sync,
impl<T> Unpin for MergingUnsetBuilder<T>where
T: Unpin,
impl<T> UnsafeUnpin for MergingUnsetBuilder<T>where
T: UnsafeUnpin,
impl<T> UnwindSafe for MergingUnsetBuilder<T>where
T: UnwindSafe,
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