Skip to main content

is_broken_pipe

Function is_broken_pipe 

Source
pub fn is_broken_pipe(err: &Error) -> bool
Expand description

Returns true when err is a broken-pipe condition (EPIPE / SIGPIPE path).

ยงExamples

use ssh_cli::errors::is_broken_pipe;
use std::io::{Error, ErrorKind};

assert!(is_broken_pipe(&Error::new(ErrorKind::BrokenPipe, "pipe")));
assert!(!is_broken_pipe(&Error::new(ErrorKind::Other, "x")));