Skip to content

Commit 66c0ba0

Browse files
authored
Preparing for 0.2 release (#75)
* Added errors and derive crate to workspace and exported derive crate from errors crate
1 parent 0a15373 commit 66c0ba0

File tree

6 files changed

+32
-4
lines changed

6 files changed

+32
-4
lines changed

Cargo.lock

+13
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

+3-1
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,7 @@ members = [
33
"lambda-runtime-client",
44
"lambda-runtime-core",
55
"lambda-runtime",
6-
"lambda-http"
6+
"lambda-http",
7+
"lambda-runtime-errors",
8+
"lambda-runtime-errors-derive"
79
]

lambda-runtime-core/Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ keywords = ["AWS", "Lambda", "Runtime", "Rust"]
77
license = "Apache-2.0"
88
homepage = "https://github.com/awslabs/aws-lambda-rust-runtime"
99
repository = "https://github.com/awslabs/aws-lambda-rust-runtime"
10-
documentation = "https://docs.rs/lambda_runtime"
10+
documentation = "https://docs.rs/lambda_runtime_core"
1111
edition = "2018"
1212

1313
[dependencies]

lambda-runtime-errors-derive/Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ keywords = ["AWS", "Lambda", "Runtime", "Rust"]
88
license = "Apache-2.0"
99
homepage = "https://github.com/awslabs/aws-lambda-rust-runtime"
1010
repository = "https://github.com/awslabs/aws-lambda-rust-runtime"
11-
documentation = "https://docs.rs/lambda_runtime"
11+
documentation = "https://docs.rs/lambda_runtime_errors_derive"
1212

1313
[dependencies]
1414
syn = "^0.15"

lambda-runtime-errors/Cargo.toml

+2-1
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,13 @@ keywords = ["AWS", "Lambda", "Runtime", "Rust"]
88
license = "Apache-2.0"
99
homepage = "https://github.com/awslabs/aws-lambda-rust-runtime"
1010
repository = "https://github.com/awslabs/aws-lambda-rust-runtime"
11-
documentation = "https://docs.rs/lambda_runtime"
11+
documentation = "https://docs.rs/lambda_runtime_errors"
1212

1313
[dependencies]
1414
log = "^0.4"
1515
failure = "^0.1"
1616
serde_json = "^1"
17+
lambda_runtime_errors_derive = { path = "../lambda-runtime-errors-derive", version = "^0.1" }
1718

1819
[dev-dependencies]
1920
lambda_runtime_core = { path = "../lambda-runtime-core", version = "^0.1"}

lambda-runtime-errors/src/lib.rs

+12
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,21 @@
11
//! The Lambda runtime errors crate defines the `LambdaErrorExt` trait
22
//! that can be used by libriaries to return errors compatible with the
33
//! AWS Lambda Rust runtime.
4+
//!
5+
//! This crate also exports the `lambda_runtime_errors_derive` crate to
6+
//! derive the `LambdaErrorExt` trait.
7+
//!
8+
//! ```rust,no-run
9+
//! use lambda_runtime_errors::*;
10+
//!
11+
//! // the generated error_type() method returns "crate::LambdaError"
12+
//! #[derive(LambdaErrorExt)]
13+
//! struct LambdaError;
14+
//! ```
415
mod error_ext_impl;
516

617
pub use crate::error_ext_impl::*;
18+
pub use lambda_runtime_errors_derive::*;
719

820
use failure::{format_err, Compat, Error, Fail};
921
use std::fmt;

0 commit comments

Comments
 (0)