pub struct Provider { /* private fields */ }Expand description
Provider abstraction
Implementations§
Source§impl Provider
impl Provider
Sourcepub fn new(config: ProviderConfig) -> Self
pub fn new(config: ProviderConfig) -> Self
Create new provider
Sourcepub async fn initialize(&mut self) -> Result<()>
pub async fn initialize(&mut self) -> Result<()>
Initialize provider
Sourcepub fn config(&self) -> &ProviderConfig
pub fn config(&self) -> &ProviderConfig
Get configuration
Sourcepub fn is_initialized(&self) -> bool
pub fn is_initialized(&self) -> bool
Check if initialized
Sourcepub fn remaining_time_ms(&self) -> Option<u64>
pub fn remaining_time_ms(&self) -> Option<u64>
Get remaining execution time (ms)
Sourcepub fn validate_payload_size(&self, size: usize) -> Result<()>
pub fn validate_payload_size(&self, size: usize) -> Result<()>
Check if request size is within limits
Sourcepub fn available_memory_mb(&self) -> u64
pub fn available_memory_mb(&self) -> u64
Get available memory
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Provider
impl RefUnwindSafe for Provider
impl Send for Provider
impl Sync for Provider
impl Unpin for Provider
impl UnwindSafe for Provider
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