pub enum AutoOr<T> {
Auto,
Value(T),
}Expand description
A hyperparameter value that is either the string "auto" or a concrete
number, mirroring the "auto" | number unions in the fine-tuning API.
Serializes AutoOr::Auto as the literal string "auto" and
AutoOr::Value as the wrapped value.
Variants§
Trait Implementations§
Source§impl<'de, T: Deserialize<'de>> Deserialize<'de> for AutoOr<T>
impl<'de, T: Deserialize<'de>> Deserialize<'de> for AutoOr<T>
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<T: PartialEq> StructuralPartialEq for AutoOr<T>
Auto Trait Implementations§
impl<T> Freeze for AutoOr<T>where
T: Freeze,
impl<T> RefUnwindSafe for AutoOr<T>where
T: RefUnwindSafe,
impl<T> Send for AutoOr<T>where
T: Send,
impl<T> Sync for AutoOr<T>where
T: Sync,
impl<T> Unpin for AutoOr<T>where
T: Unpin,
impl<T> UnsafeUnpin for AutoOr<T>where
T: UnsafeUnpin,
impl<T> UnwindSafe for AutoOr<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