pub struct CallContext<'a> { /* private fields */ }Implementations§
Source§impl<'a> CallContext<'a>
impl<'a> CallContext<'a>
pub fn new( arena: &'a Arena, backpressure: f32, trace_id: u128, span_id: u64, deadline: Option<Instant>, module_caller: Option<&'a ModuleCaller>, ) -> Self
pub fn backpressure(&self) -> f32
pub fn arena(&self) -> &'a Arena
pub fn trace_id(&self) -> u128
pub fn span_id(&self) -> u64
pub fn deadline(&self) -> Option<Instant>
pub fn is_expired(&self) -> bool
pub fn remaining_time(&self) -> Option<Duration>
pub fn module_caller(&self) -> Option<&'a ModuleCaller>
pub async fn call( &self, module: &str, method: &str, args: &[u8], ) -> Result<Vec<u8>>
pub async fn call_with_timeout( &self, module: &str, method: &str, args: &[u8], timeout: Duration, ) -> Result<Vec<u8>>
pub fn set_backpressure(&mut self, backpressure: f32)
Auto Trait Implementations§
impl<'a> Freeze for CallContext<'a>
impl<'a> RefUnwindSafe for CallContext<'a>
impl<'a> Send for CallContext<'a>
impl<'a> Sync for CallContext<'a>
impl<'a> Unpin for CallContext<'a>
impl<'a> UnsafeUnpin for CallContext<'a>
impl<'a> UnwindSafe for CallContext<'a>
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