pub struct Context {
pub memory_limit_in_mb: usize,
pub time_limit_in_ms: usize,
pub request_id: String,
pub namespace: String,
pub function_name: String,
pub function_version: String,
pub region: String,
pub appid: String,
pub uin: String,
}
Expand description
The context of the invocation, assembled from environment variables and invocation headers.
The concrete description of each field can be found at Custom Runtime API and Built-in Environment Variables.
Fields§
§memory_limit_in_mb: usize
from header memory_limit_in_mb
time_limit_in_ms: usize
from header time_limit_in_ms
request_id: String
from header request_id
namespace: String
from enviroment variable SCF_NAMESPACE
function_name: String
from enviroment variables SCF_FUNCTIONNAME
function_version: String
from enviroment variable SCF_FUNCTIONVERSION
region: String
from enviroment variable TENCENTCLOUD_REGION
appid: String
from enviroment variable TENCENTCLOUD_APPID
uin: String
from enviroment variable TENCENTCLOUD_UIN
Trait Implementations§
impl Eq for Context
impl StructuralPartialEq for Context
Auto Trait Implementations§
impl Freeze for Context
impl RefUnwindSafe for Context
impl Send for Context
impl Sync for Context
impl Unpin for Context
impl UnwindSafe for Context
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more