diff --git a/actix-multipart/CHANGES.md b/actix-multipart/CHANGES.md index e9d1314e5..adc568253 100644 --- a/actix-multipart/CHANGES.md +++ b/actix-multipart/CHANGES.md @@ -2,6 +2,10 @@ ## Unreleased +## 0.7.1 + +- Expose `LimitExceeded` error type. + ## 0.7.0 - Add `MultipartError::ContentTypeIncompatible` variant. diff --git a/actix-multipart/Cargo.toml b/actix-multipart/Cargo.toml index 61a9b5089..f567d2d7c 100644 --- a/actix-multipart/Cargo.toml +++ b/actix-multipart/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "actix-multipart" -version = "0.7.0" +version = "0.7.1" authors = [ "Nikolay Kim ", "Jacob Halsey ", diff --git a/actix-multipart/README.md b/actix-multipart/README.md index 0356976b2..20673d524 100644 --- a/actix-multipart/README.md +++ b/actix-multipart/README.md @@ -3,11 +3,11 @@ [![crates.io](https://img.shields.io/crates/v/actix-multipart?label=latest)](https://crates.io/crates/actix-multipart) -[![Documentation](https://docs.rs/actix-multipart/badge.svg?version=0.7.0)](https://docs.rs/actix-multipart/0.7.0) +[![Documentation](https://docs.rs/actix-multipart/badge.svg?version=0.7.1)](https://docs.rs/actix-multipart/0.7.1) ![Version](https://img.shields.io/badge/rustc-1.72+-ab6000.svg) ![MIT or Apache 2.0 licensed](https://img.shields.io/crates/l/actix-multipart.svg)
-[![dependency status](https://deps.rs/crate/actix-multipart/0.7.0/status.svg)](https://deps.rs/crate/actix-multipart/0.7.0) +[![dependency status](https://deps.rs/crate/actix-multipart/0.7.1/status.svg)](https://deps.rs/crate/actix-multipart/0.7.1) [![Download](https://img.shields.io/crates/d/actix-multipart.svg)](https://crates.io/crates/actix-multipart) [![Chat on Discord](https://img.shields.io/discord/771444961383153695?label=chat&logo=discord)](https://discord.gg/NWpN5mmg3x) diff --git a/actix-multipart/src/field.rs b/actix-multipart/src/field.rs index 6bb1e5265..0e4167c8e 100644 --- a/actix-multipart/src/field.rs +++ b/actix-multipart/src/field.rs @@ -22,8 +22,10 @@ use crate::{ safety::Safety, }; +/// Error type returned from [`Field::bytes()`] when field data is larger than limit. #[derive(Debug, Display, Error)] -#[display(fmt = "limit exceeded")] +#[display(fmt = "size limit exceeded while collecting field data")] +#[non_exhaustive] pub struct LimitExceeded; /// A single field in a multipart stream. diff --git a/actix-multipart/src/lib.rs b/actix-multipart/src/lib.rs index ac07a172a..a56b9846b 100644 --- a/actix-multipart/src/lib.rs +++ b/actix-multipart/src/lib.rs @@ -63,4 +63,8 @@ pub(crate) mod payload; pub(crate) mod safety; pub mod test; -pub use self::{error::Error as MultipartError, field::Field, multipart::Multipart}; +pub use self::{ + error::Error as MultipartError, + field::{Field, LimitExceeded}, + multipart::Multipart, +};