pub struct Context { /* private fields */ }
Expand description
Represents context about an Azure Function invocation.
Implementations§
Source§impl Context
impl Context
Sourcepub fn current() -> Option<Self>
pub fn current() -> Option<Self>
Gets the current invocation context.
Returns None if there is no invocation context.
Sourcepub fn invocation_id(&self) -> &str
pub fn invocation_id(&self) -> &str
Gets the invocation identifier for the current Azure Function.
Sourcepub fn function_id(&self) -> &str
pub fn function_id(&self) -> &str
Gets the function identifier for the current Azure Function.
Sourcepub fn function_name(&self) -> &str
pub fn function_name(&self) -> &str
Gets the name of the current Azure Function.
Sourcepub fn function_directory(&self) -> Option<PathBuf>
pub fn function_directory(&self) -> Option<PathBuf>
Gets the directory for the current Azure Function.
Sourcepub fn app_directory(&self) -> Option<PathBuf>
pub fn app_directory(&self) -> Option<PathBuf>
Gets the directory for the current Azure Function Application.
Trait Implementations§
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> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T
in a tonic::Request