Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions lambda-events/src/event/dynamodb/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ use std::fmt;
mod attributes;

#[derive(Clone, Debug, Default, Deserialize, Eq, PartialEq, Serialize)]
#[non_exhaustive]
#[serde(rename_all = "SCREAMING_SNAKE_CASE")]
pub enum StreamViewType {
NewImage,
Expand All @@ -35,6 +36,7 @@ impl fmt::Display for StreamViewType {
}

#[derive(Clone, Debug, Default, Deserialize, Eq, PartialEq, Serialize)]
#[non_exhaustive]
#[serde(rename_all = "SCREAMING_SNAKE_CASE")]
pub enum StreamStatus {
Enabling,
Expand All @@ -57,6 +59,7 @@ impl fmt::Display for StreamStatus {
}

#[derive(Clone, Debug, Default, Deserialize, Eq, PartialEq, Serialize)]
#[non_exhaustive]
#[serde(rename_all = "SCREAMING_SNAKE_CASE")]
pub enum SharedIteratorType {
TrimHorizon,
Expand All @@ -79,6 +82,7 @@ impl fmt::Display for SharedIteratorType {
}

#[derive(Clone, Debug, Default, Deserialize, Eq, PartialEq, Serialize)]
#[non_exhaustive]
#[serde(rename_all = "SCREAMING_SNAKE_CASE")]
pub enum OperationType {
#[default]
Expand All @@ -99,6 +103,7 @@ impl fmt::Display for OperationType {
}

#[derive(Clone, Default, Debug, Deserialize, Eq, PartialEq, Serialize)]
#[non_exhaustive]
#[serde(rename_all = "SCREAMING_SNAKE_CASE")]
pub enum KeyType {
#[default]
Expand Down
3 changes: 3 additions & 0 deletions lambda-http/src/ext/request.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ use crate::Body;
///
/// Returned by [`RequestPayloadExt::payload()`]
#[derive(Debug)]
#[non_exhaustive]
pub enum PayloadError {
/// Returned when `application/json` bodies fail to deserialize a payload
Json(serde_json::Error),
Expand All @@ -22,13 +23,15 @@ pub enum PayloadError {

/// Indicates a problem processing a JSON payload.
#[derive(Debug)]
#[non_exhaustive]
pub enum JsonPayloadError {
/// Problem deserializing a JSON payload.
Parsing(serde_json::Error),
}

/// Indicates a problem processing an x-www-form-urlencoded payload.
#[derive(Debug)]
#[non_exhaustive]
pub enum FormUrlEncodedPayloadError {
/// Problem deserializing an x-www-form-urlencoded payload.
Parsing(SerdeError),
Expand Down