pub struct ValidatedConfig<T, S = Unvalidated> {
pub config: T,
/* private fields */
}Expand description
Configuration wrapper that tracks validation state at compile time
Fields§
§config: TImplementations§
Source§impl<T> ValidatedConfig<T, Unvalidated>
impl<T> ValidatedConfig<T, Unvalidated>
Sourcepub fn validate(
self,
) -> Result<ValidatedConfig<T, ValidatedState>, SklearsError>where
T: ValidConfig,
pub fn validate(
self,
) -> Result<ValidatedConfig<T, ValidatedState>, SklearsError>where
T: ValidConfig,
Validate the configuration at compile time
Source§impl<T> ValidatedConfig<T, ValidatedState>
impl<T> ValidatedConfig<T, ValidatedState>
Sourcepub fn into_inner(self) -> T
pub fn into_inner(self) -> T
Consume the wrapper and return the validated configuration
Auto Trait Implementations§
impl<T, S> Freeze for ValidatedConfig<T, S>where
T: Freeze,
impl<T, S> RefUnwindSafe for ValidatedConfig<T, S>where
T: RefUnwindSafe,
S: RefUnwindSafe,
impl<T, S> Send for ValidatedConfig<T, S>
impl<T, S> Sync for ValidatedConfig<T, S>
impl<T, S> Unpin for ValidatedConfig<T, S>
impl<T, S> UnwindSafe for ValidatedConfig<T, S>where
T: UnwindSafe,
S: 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
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