pub enum Input {
Text(String),
File(PathBuf),
Bytes(Vec<u8>),
Reader(Box<dyn Read + Send + Sync>),
}Expand description
Unified input abstraction for various data sources
Variants§
Text(String)
Direct text input
File(PathBuf)
File path input
Bytes(Vec<u8>)
Raw bytes input
Reader(Box<dyn Read + Send + Sync>)
Reader input (boxed for object safety)
Implementations§
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Input
impl !RefUnwindSafe for Input
impl Send for Input
impl Sync for Input
impl Unpin for Input
impl !UnwindSafe for Input
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