Skip to main content

scan

Function scan 

Source
pub fn scan(
    args: &[String],
    read_file: impl Fn(&str) -> Result<Option<Vec<u8>>, ()>,
    stdin: impl FnMut() -> Result<Vec<u8>, ()>,
) -> Scan
Expand description

Scan gh <args>. read_file gives a file’s text, whatever kind of file it is (a pipe, a device): Ok(None) when it isn’t there (gh will say so itself), Err when it is too large to scan. stdin gives what stdin holds, read at most once. The bytes are kept as they are for the copy gh is given (a binary upload must arrive unchanged); only the scan reads them as text.