Struct opendal::layers::ConcurrentLimitLayer
source · pub struct ConcurrentLimitLayer { /* private fields */ }
Expand description
ConcurrentLimitLayer will add concurrent limit for OpenDAL.
Examples
use anyhow::Result;
use opendal::layers::ConcurrentLimitLayer;
use opendal::services;
use opendal::Operator;
use opendal::Scheme;
let _ = Operator::from_env::<services::Fs>()
.expect("must init")
.layer(ConcurrentLimitLayer::new(1024))
.finish();
Implementations§
Trait Implementations§
source§impl<A: Accessor> Layer<A> for ConcurrentLimitLayer
impl<A: Accessor> Layer<A> for ConcurrentLimitLayer
§type LayeredAccessor = ConcurrentLimitAccessor<A>
type LayeredAccessor = ConcurrentLimitAccessor<A>
The layered accessor that return by this layer.
source§fn layer(&self, inner: A) -> Self::LayeredAccessor
fn layer(&self, inner: A) -> Self::LayeredAccessor
Intercept the operations on the underlying storage.