pub struct InvocationBuilder { /* private fields */ }Expand description
Builder for creating invocations with custom properties.
Implementations§
Source§impl InvocationBuilder
impl InvocationBuilder
Sourcepub fn new() -> Self
pub fn new() -> Self
Creates a new invocation builder.
§Examples
use serde_json::json;
use lambda_simulator::invocation::InvocationBuilder;
let invocation = InvocationBuilder::new()
.payload(json!({"key": "value"}))
.build();Sourcepub fn timeout_ms(self, timeout_ms: u64) -> Self
pub fn timeout_ms(self, timeout_ms: u64) -> Self
Sets the timeout in milliseconds.
Sourcepub fn function_arn(self, arn: impl Into<String>) -> Self
pub fn function_arn(self, arn: impl Into<String>) -> Self
Sets the function ARN.
Sourcepub fn client_context(self, context: impl Into<String>) -> Self
pub fn client_context(self, context: impl Into<String>) -> Self
Sets the client context.
Sourcepub fn cognito_identity(self, identity: impl Into<String>) -> Self
pub fn cognito_identity(self, identity: impl Into<String>) -> Self
Sets the Cognito identity.
Sourcepub fn build(self) -> Result<Invocation, BuilderError>
pub fn build(self) -> Result<Invocation, BuilderError>
Trait Implementations§
Source§impl Debug for InvocationBuilder
impl Debug for InvocationBuilder
Source§impl Default for InvocationBuilder
impl Default for InvocationBuilder
Source§fn default() -> InvocationBuilder
fn default() -> InvocationBuilder
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for InvocationBuilder
impl RefUnwindSafe for InvocationBuilder
impl Send for InvocationBuilder
impl Sync for InvocationBuilder
impl Unpin for InvocationBuilder
impl UnwindSafe for InvocationBuilder
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more