Skip to main content

Transport

Trait Transport 

Source
pub trait Transport {
    // Required method
    fn get(&self, url: &str) -> Result<Vec<u8>, String>;
}
Expand description

Something that fetches a URL’s bytes: Http with the http feature, Replay’s recorded responses in tests.

Required Methods§

Source

fn get(&self, url: &str) -> Result<Vec<u8>, String>

The body at url.

§Errors

A short reason, which the client wraps in NetError::Transport.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementations on Foreign Types§

Source§

impl<T: Transport + ?Sized> Transport for &T

Source§

fn get(&self, url: &str) -> Result<Vec<u8>, String>

Implementors§