Rust SDK 0.4.0
Added specific error types for some API calls:
fastly::error::SendErroris returned by APIs that send backend requests. Note that the common case for a failed request remains an
Okresult with a 5xx status code response.
fastly::error::BufferSizeErroris returned by handle API calls that can fail due to an insufficient buffer size.
RequestHandle::send_async_streaming(), which allow programs to continue writing bytes to upstream request bodies after the headers have been sent.
Backend::name()to get the string representation of a backend.
ResponseExt::backend()to retrieve the
Backenda response came from.
ResponseExt::take_backend_request()to retrieve the
Requestthat this response was returned from, minus the body which is consumed when the request is sent. The
takevariant takes ownership of the
Requestso that it can be subsequently reused for another backend request.
PendingRequest::sent_req()to retrieve the
Requestthat was sent, minus the body which is consumed when the request is sent.
Resultreturn types from various functions and methods. Internal errors will now cause a panic. This primarily impacts the
ResponseHandletypes. This helps remove noise from
?operators in cases where user programs cannot realistically recover from the error.
ResponseHandlewill now return
Ok(None)if the header does not exist, rather than an empty header.
ResponseHandle::send_downstream()now begin sending the responses immediately, rather than when the program exits.
Backend::from_name(), and deprecated the old name.
Backend::new()in favor of
fastly::abisubmodule from the public interface.
impl From<PendingRequestHandle> for PendingRequest, as
PendingRequestsnow must be build with the backend
Requestthey were sent with.