Function taskcluster_download::download_to_buf[][src]

pub async fn download_to_buf<'a>(
    name: &str,
    retry: &Retry,
    object_service: &Object,
    buf: &'a mut [u8]
) -> Result<(&'a [u8], String)>

Download an object into the given buffer and return the slice of that buffer containing the object. If the object is larger than the buffer, then resulting error can be downcast to std::io::Error with kind WriteZero and the somewhat cryptic message “write zero byte into writer”. Returns (slice, content_type)