pub struct Performance { /* private fields */ }
Expand description
Performance optimization manager
Implementations§
Source§impl Performance
impl Performance
Sourcepub fn new(
config: Arc<SupabaseConfig>,
http_client: Arc<HttpClient>,
) -> Result<Self>
pub fn new( config: Arc<SupabaseConfig>, http_client: Arc<HttpClient>, ) -> Result<Self>
Create a new Performance instance
Sourcepub fn new_with_config(
config: Arc<SupabaseConfig>,
http_client: Arc<HttpClient>,
pool_config: ConnectionPoolConfig,
cache_config: CacheConfig,
batch_config: BatchConfig,
) -> Result<Self>
pub fn new_with_config( config: Arc<SupabaseConfig>, http_client: Arc<HttpClient>, pool_config: ConnectionPoolConfig, cache_config: CacheConfig, batch_config: BatchConfig, ) -> Result<Self>
Create with custom configuration
Sourcepub async fn get_client(&self, host: &str) -> Result<Arc<HttpClient>>
pub async fn get_client(&self, host: &str) -> Result<Arc<HttpClient>>
Get optimized HTTP client for a host
Sourcepub async fn cache_response(
&self,
key: &str,
data: Value,
ttl: Option<Duration>,
) -> Result<()>
pub async fn cache_response( &self, key: &str, data: Value, ttl: Option<Duration>, ) -> Result<()>
Cache a response with optional TTL
Sourcepub async fn get_cached_response(&self, key: &str) -> Result<Option<Value>>
pub async fn get_cached_response(&self, key: &str) -> Result<Option<Value>>
Get cached response
Sourcepub async fn add_to_batch(&self, operation: BatchOperation) -> Result<()>
pub async fn add_to_batch(&self, operation: BatchOperation) -> Result<()>
Add operation to batch processing queue
Sourcepub async fn process_batch(&self) -> Result<Vec<BatchResult>>
pub async fn process_batch(&self) -> Result<Vec<BatchResult>>
Process pending batch operations
Sourcepub async fn get_metrics(&self) -> PerformanceMetrics
pub async fn get_metrics(&self) -> PerformanceMetrics
Get performance metrics
Sourcepub async fn clear_cache(&self) -> Result<()>
pub async fn clear_cache(&self) -> Result<()>
Clear all caches
Trait Implementations§
Source§impl Clone for Performance
impl Clone for Performance
Source§fn clone(&self) -> Performance
fn clone(&self) -> Performance
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreAuto Trait Implementations§
impl Freeze for Performance
impl !RefUnwindSafe for Performance
impl Send for Performance
impl Sync for Performance
impl Unpin for Performance
impl !UnwindSafe for Performance
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> 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