pub struct Curl {
pub max_seconds: u64,
}Expand description
curl, run with a fixed argument vector: the URL is an argument, never shell text, and
the probe is bounded so that an unreachable host costs a known number of seconds.
use majordomus_cli::served::{Curl, Fetch, Fetched};
let got = Curl { max_seconds: 2 }.fetch("http://127.0.0.1:9/build.json");
assert!(matches!(got, Fetched::Unreachable(ref why) if why.contains("curl")), "{got:?}");Fields§
§max_seconds: u64The bound on one probe, in seconds.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Curl
impl RefUnwindSafe for Curl
impl Send for Curl
impl Sync for Curl
impl Unpin for Curl
impl UnsafeUnpin for Curl
impl UnwindSafe for Curl
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