Skip to content

fix(docs): enable all features in docs.rs build #1000

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
May 30, 2025
Merged
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
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ async fn main() -> Result<(), Error> {
let shutdown_hook = || async move {
std::mem::drop(log_guard);
};
lambda_runtime::spawn_graceful_shutdown_handler(shutdown_hook);
lambda_runtime::spawn_graceful_shutdown_handler(shutdown_hook).await;

lambda_runtime::run(func).await?;
Ok(())
Expand Down
3 changes: 3 additions & 0 deletions lambda-events/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -124,3 +124,6 @@ sqs = ["serde_with"]
streams = []
documentdb = []
eventbridge = ["chrono", "serde_with"]

[package.metadata.docs.rs]
all-features = true
1 change: 1 addition & 0 deletions lambda-events/src/custom_serde/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ use std::collections::HashMap;
#[cfg(feature = "codebuild")]
pub(crate) mod codebuild_time;
#[cfg(feature = "codebuild")]
#[cfg_attr(docsrs, doc(cfg(feature = "codebuild")))]
pub type CodeBuildNumber = f32;

#[cfg(any(
Expand Down
2 changes: 2 additions & 0 deletions lambda-events/src/encodings/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,12 @@ mod time;
use crate::custom_serde::{deserialize_base64, serialize_base64};

#[cfg(feature = "chrono")]
#[cfg_attr(docsrs, doc(cfg(feature = "chrono")))]
pub use self::time::*;
#[cfg(feature = "http")]
mod http;
#[cfg(feature = "http")]
#[cfg_attr(docsrs, doc(cfg(feature = "http")))]
pub use self::http::*;

pub type Error = Box<dyn std::error::Error + Send + Sync>;
Expand Down
41 changes: 41 additions & 0 deletions lambda-events/src/event/mod.rs
Original file line number Diff line number Diff line change
@@ -1,162 +1,203 @@
/// AWS Lambda event definitions for activemq.
#[cfg(feature = "activemq")]
#[cfg_attr(docsrs, doc(cfg(feature = "activemq")))]
pub mod activemq;

/// AWS Lambda event definitions for alb.
#[cfg(feature = "alb")]
#[cfg_attr(docsrs, doc(cfg(feature = "alb")))]
pub mod alb;
/// AWS Lambda event definitions for apigw.
#[cfg(feature = "apigw")]
#[cfg_attr(docsrs, doc(cfg(feature = "apigw")))]
pub mod apigw;

/// AWS Lambda event definitions for appsync.
#[cfg(feature = "appsync")]
#[cfg_attr(docsrs, doc(cfg(feature = "appsync")))]
pub mod appsync;

/// AWS Lambda event definitions for autoscaling.
#[cfg(feature = "autoscaling")]
#[cfg_attr(docsrs, doc(cfg(feature = "autoscaling")))]
pub mod autoscaling;

/// AWS Lambda event definitions for agent for amazon bedrock
#[cfg(feature = "bedrock_agent_runtime")]
#[cfg_attr(docsrs, doc(cfg(feature = "bedrock_agent_runtime")))]
pub mod bedrock_agent_runtime;

/// AWS Lambda event definitions for chime_bot.
#[cfg(feature = "chime_bot")]
#[cfg_attr(docsrs, doc(cfg(feature = "chime_bot")))]
pub mod chime_bot;

/// AWS Lambda event definitions for clientvpn.
#[cfg(feature = "clientvpn")]
#[cfg_attr(docsrs, doc(cfg(feature = "clientvpn")))]
pub mod clientvpn;

/// AWS Lambda event definitions for cloudformation.
#[cfg(feature = "cloudformation")]
#[cfg_attr(docsrs, doc(cfg(feature = "cloudformation")))]
pub mod cloudformation;

/// AWS Lambda event definitions for CloudWatch alarms.
#[cfg(feature = "cloudwatch_alarms")]
#[cfg_attr(docsrs, doc(cfg(feature = "cloudwatch_alarms")))]
pub mod cloudwatch_alarms;

/// AWS Lambda event definitions for CloudWatch events.
#[cfg(feature = "cloudwatch_events")]
#[cfg_attr(docsrs, doc(cfg(feature = "cloudwatch_events")))]
pub mod cloudwatch_events;

/// AWS Lambda event definitions for cloudwatch_logs.
#[cfg(feature = "cloudwatch_logs")]
#[cfg_attr(docsrs, doc(cfg(feature = "cloudwatch_logs")))]
pub mod cloudwatch_logs;

/// AWS Lambda event definitions for code_commit.
#[cfg(feature = "code_commit")]
#[cfg_attr(docsrs, doc(cfg(feature = "code_commit")))]
pub mod code_commit;

/// AWS Lambda event definitions for codebuild.
#[cfg(feature = "codebuild")]
#[cfg_attr(docsrs, doc(cfg(feature = "codebuild")))]
pub mod codebuild;

/// AWS Lambda event definitions for codedeploy.
#[cfg(feature = "codedeploy")]
#[cfg_attr(docsrs, doc(cfg(feature = "codedeploy")))]
pub mod codedeploy;

/// AWS Lambda event definitions for codepipeline_cloudwatch.
#[cfg(feature = "codepipeline_cloudwatch")]
#[cfg_attr(docsrs, doc(cfg(feature = "codepipeline_cloudwatch")))]
pub mod codepipeline_cloudwatch;

/// AWS Lambda event definitions for codepipeline_job.
#[cfg(feature = "codepipeline_job")]
#[cfg_attr(docsrs, doc(cfg(feature = "codepipeline_job")))]
pub mod codepipeline_job;

/// AWS Lambda event definitions for cognito.
#[cfg(feature = "cognito")]
#[cfg_attr(docsrs, doc(cfg(feature = "cognito")))]
pub mod cognito;

/// AWS Lambda event definitions for config.
#[cfg(feature = "config")]
#[cfg_attr(docsrs, doc(cfg(feature = "config")))]
pub mod config;

/// AWS Lambda event definitions for connect.
#[cfg(feature = "connect")]
#[cfg_attr(docsrs, doc(cfg(feature = "connect")))]
pub mod connect;

/// AWS Lambda event definitions for dynamodb.
#[cfg(feature = "dynamodb")]
#[cfg_attr(docsrs, doc(cfg(feature = "dynamodb")))]
pub mod dynamodb;

/// AWS Lambda event definitions for ecr_scan.
#[cfg(feature = "ecr_scan")]
#[cfg_attr(docsrs, doc(cfg(feature = "ecr_scan")))]
pub mod ecr_scan;

/// AWS Lambda event definitions for firehose.
#[cfg(feature = "firehose")]
#[cfg_attr(docsrs, doc(cfg(feature = "firehose")))]
pub mod firehose;

/// AWS Lambda event definitions for iam.
#[cfg(feature = "iam")]
#[cfg_attr(docsrs, doc(cfg(feature = "iam")))]
pub mod iam;

/// AWS Lambda event definitions for iot.
#[cfg(feature = "iot")]
#[cfg_attr(docsrs, doc(cfg(feature = "iot")))]
pub mod iot;

/// AWS Lambda event definitions for iot_1_click.
#[cfg(feature = "iot_1_click")]
#[cfg_attr(docsrs, doc(cfg(feature = "iot_1_click")))]
pub mod iot_1_click;

/// AWS Lambda event definitions for iot_button.
#[cfg(feature = "iot_button")]
#[cfg_attr(docsrs, doc(cfg(feature = "iot_button")))]
pub mod iot_button;

/// AWS Lambda event definitions for iot_deprecated.
#[cfg(feature = "iot_deprecated")]
#[cfg_attr(docsrs, doc(cfg(feature = "iot_deprecated")))]
pub mod iot_deprecated;

/// AWS Lambda event definitions for kafka.
#[cfg(feature = "kafka")]
#[cfg_attr(docsrs, doc(cfg(feature = "kafka")))]
pub mod kafka;

/// AWS Lambda event definitions for kinesis.
#[cfg(feature = "kinesis")]
#[cfg_attr(docsrs, doc(cfg(feature = "kinesis")))]
pub mod kinesis;

/// AWS Lambda event definitions for lambda_function_urls.
#[cfg(feature = "lambda_function_urls")]
#[cfg_attr(docsrs, doc(cfg(feature = "lambda_function_urls")))]
pub mod lambda_function_urls;

/// AWS Lambda event definitions for lex.
#[cfg(feature = "lex")]
#[cfg_attr(docsrs, doc(cfg(feature = "lex")))]
pub mod lex;

/// AWS Lambda event definitions for rabbitmq.
#[cfg(feature = "rabbitmq")]
#[cfg_attr(docsrs, doc(cfg(feature = "rabbitmq")))]
pub mod rabbitmq;

/// AWS Lambda event definitions for s3.
#[cfg(feature = "s3")]
#[cfg_attr(docsrs, doc(cfg(feature = "s3")))]
pub mod s3;

/// AWS Lambda event definitions for secretsmanager.
#[cfg(feature = "secretsmanager")]
#[cfg_attr(docsrs, doc(cfg(feature = "secretsmanager")))]
pub mod secretsmanager;

/// AWS Lambda event definitions for ses.
#[cfg(feature = "ses")]
#[cfg_attr(docsrs, doc(cfg(feature = "ses")))]
pub mod ses;

/// AWS Lambda event definitions for SNS.
#[cfg(feature = "sns")]
#[cfg_attr(docsrs, doc(cfg(feature = "sns")))]
pub mod sns;

/// AWS Lambda event definitions for SQS.
#[cfg(feature = "sqs")]
#[cfg_attr(docsrs, doc(cfg(feature = "sqs")))]
pub mod sqs;

/// AWS Lambda event definitions for streams.
#[cfg(feature = "streams")]
#[cfg_attr(docsrs, doc(cfg(feature = "streams")))]
pub mod streams;

// AWS Lambda event definitions for DocumentDB
#[cfg(feature = "documentdb")]
#[cfg_attr(docsrs, doc(cfg(feature = "documentdb")))]
pub mod documentdb;

/// AWS Lambda event definitions for EventBridge.
#[cfg(feature = "eventbridge")]
#[cfg_attr(docsrs, doc(cfg(feature = "eventbridge")))]
pub mod eventbridge;
Loading
Loading