pub struct InputPair {
pub fidl_input: Input,
pub input: Input,
}
Expand description
Represents an Input
that can send or read data from an associated FidlInput
.
Fields§
§fidl_input: Input
Socket and size used to send input data to or receive input data from a fuzzer.
input: Input
Client-side representation of a fuzzer input.
Implementations§
Source§impl InputPair
impl InputPair
Sourcepub fn try_from_str<S, O>(input: S, writer: &Writer<O>) -> Result<Self>
pub fn try_from_str<S, O>(input: S, writer: &Writer<O>) -> Result<Self>
Generates an input pair from a string.
The input
string can be either a file name or a hex-encoded value. This method also
returns a fuchsia.fuzzer.Input
that can be sent via FIDL calls to receive this object’s
data. The writer
is used to alert the user if there is ambiguity about how to interpret
input
.
Returns an error if the input
string is neither valid hex nor a valid path to a file.
Sourcepub fn try_from_path<P: AsRef<Path>>(path: P) -> Result<Self>
pub fn try_from_path<P: AsRef<Path>>(path: P) -> Result<Self>
Generates an input pair from a filesystem path.
Returns an error if the path
is invalid.
Sourcepub fn try_from_data(input_data: Vec<u8>) -> Result<Self>
pub fn try_from_data(input_data: Vec<u8>) -> Result<Self>
Creates an input pair from a sequence of bytes.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for InputPair
impl RefUnwindSafe for InputPair
impl Send for InputPair
impl Sync for InputPair
impl Unpin for InputPair
impl UnwindSafe for InputPair
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