Skip to main content

ConcurrentLimitService

Struct ConcurrentLimitService 

Source
struct ConcurrentLimitService {
    inner: Servicer,
    limited: Servicer,
    semaphore: SharedSemaphore,
}

Fields§

§inner: Servicer§limited: Servicer§semaphore: SharedSemaphore

Trait Implementations§

Source§

impl Debug for ConcurrentLimitService

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Service for ConcurrentLimitService

Source§

type Composer = Box<dyn ComposeDyn>

Composer returned by compose.
Source§

type Copier = Box<dyn CopyDyn>

Copier returned by copy.
Source§

type Deleter = Box<dyn DeleteDyn>

Deleter returned by delete.
Source§

type Lister = ConcurrentLimitLister

Lister returned by list.
Source§

type Reader = Box<dyn ReadDyn>

Reader returned by read.
Source§

type Writer = Box<dyn WriteDyn>

Writer returned by write.
Source§

fn info(&self) -> ServiceInfo

Return the immutable identity and configuration for this service.
Source§

fn capability(&self) -> Capability

Return the capability of this service stack. Read more
Source§

async fn create_dir( &self, ctx: &OperationContext, path: &str, args: OpCreateDir, ) -> Result<RpCreateDir>

Invoke the create operation on the specified path. Read more
Source§

async fn stat( &self, ctx: &OperationContext, path: &str, args: OpStat, ) -> Result<RpStat>

Invoke the stat operation on the specified path. Read more
Source§

fn read( &self, ctx: &OperationContext, path: &str, args: OpRead, ) -> Result<Self::Reader>

Invoke the read operation on the specified path. Read more
Source§

fn write( &self, ctx: &OperationContext, path: &str, args: OpWrite, ) -> Result<Self::Writer>

Invoke the write operation on the specified path. Read more
Source§

fn delete(&self, ctx: &OperationContext) -> Result<Self::Deleter>

Invoke the delete operation. Read more
Source§

fn list( &self, ctx: &OperationContext, path: &str, args: OpList, ) -> Result<Self::Lister>

Invoke the list operation on the specified path. Read more
Source§

fn copy( &self, ctx: &OperationContext, from: &str, to: &str, args: OpCopy, ) -> Result<Self::Copier>

Invoke the copy operation on the specified from path and to path. Read more
Source§

fn compose( &self, ctx: &OperationContext, to: &str, args: OpCompose, ) -> Result<Self::Composer>

Invoke the compose operation for the specified destination path. Read more
Source§

async fn restore( &self, ctx: &OperationContext, path: &str, args: OpRestore, ) -> Result<RpRestore>

Invoke the restore operation on the specified path. Read more
Source§

async fn rename( &self, ctx: &OperationContext, from: &str, to: &str, args: OpRename, ) -> Result<RpRename>

Invoke the rename operation on the specified from path and to path. Read more
Source§

async fn presign( &self, ctx: &OperationContext, path: &str, args: OpPresign, ) -> Result<RpPresign>

Invoke the presign operation on the specified path. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
§

impl<U> As for U

§

fn as_<T>(self) -> T
where T: CastFrom<U>, U: Sized,

Casts self to type T. The semantics of numeric casting with the as operator are followed, so <T as As>::as_::<U> can be used in the same way as T as U for numeric conversions. Read more
§

impl<T> AsAny for T
where T: Any,

§

fn as_any(&self) -> &(dyn Any + 'static)

§

fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)

§

fn type_name(&self) -> &'static str

Gets the type name of self
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
§

impl<T> Downcast for T
where T: AsAny + ?Sized,

§

fn is<T>(&self) -> bool
where T: AsAny,

Returns true if the boxed type is the same as T. Read more
§

fn downcast_ref<T>(&self) -> Option<&T>
where T: AsAny,

Forward to the method defined on the type Any.
§

fn downcast_mut<T>(&mut self) -> Option<&mut T>
where T: AsAny,

Forward to the method defined on the type Any.
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

§

impl<T> FutureExt for T

§

fn with_context(self, otel_cx: Context) -> WithContext<Self>

Attaches the provided Context to this type, returning a WithContext wrapper. Read more
§

fn with_current_context(self) -> WithContext<Self>

Attaches the current Context to this type, returning a WithContext wrapper. Read more
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

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 more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

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
§

impl<T> IntoRequest<T> for T

§

fn into_request(self) -> Request<T>

Wrap the input message T in a tonic::Request
§

impl<T> IntoResult<T> for T

§

type Err = Infallible

§

fn into_result(self) -> Result<T, <T as IntoResult<T>>::Err>

§

impl<Unshared, Shared> IntoShared<Shared> for Unshared
where Shared: FromUnshared<Unshared>,

§

fn into_shared(self) -> Shared

Creates a shared type from an unshared type.
§

impl<L> LayerExt<L> for L

§

fn named_layer<S>(&self, service: S) -> Layered<<L as Layer<S>>::Service, S>
where L: Layer<S>,

Applies the layer to a service and wraps it in [Layered].
Source§

impl<T> LruValue for T
where T: Send + Sync,

§

impl<T> MaybeSend for T
where T: Send,

§

impl<T> MaybeSend for T
where T: Send,

Source§

impl<M> MetricVecRelabelExt for M

Source§

fn relabel( self, metric_level: MetricLevel, relabel_threshold: MetricLevel, ) -> RelabeledMetricVec<M>

Source§

fn relabel_n( self, metric_level: MetricLevel, relabel_threshold: MetricLevel, relabel_num: usize, ) -> RelabeledMetricVec<M>

Source§

fn relabel_debug_1( self, relabel_threshold: MetricLevel, ) -> RelabeledMetricVec<M>

Equivalent to RelabeledMetricVec::with_metric_level_relabel_n with metric_level set to MetricLevel::Debug and relabel_num set to 1.
§

impl<T> Pointable for T

§

const ALIGN: usize

The alignment of pointer.
§

type Init = T

The type for initializers.
§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
§

impl<T> PolicyExt for T
where T: ?Sized,

§

fn and<P, B, E>(self, other: P) -> And<T, P>
where T: Sized + Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns [Action::Follow] only if self and other return Action::Follow. Read more
§

fn or<P, B, E>(self, other: P) -> Or<T, P>
where T: Sized + Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns [Action::Follow] if either self or other returns Action::Follow. Read more
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
§

impl<T> Scope for T

§

fn with<F, R>(self, f: F) -> R
where Self: Sized, F: FnOnce(Self) -> R,

Scoped with ownership.
§

fn with_ref<F, R>(&self, f: F) -> R
where F: FnOnce(&Self) -> R,

Scoped with reference.
§

fn with_mut<F, R>(&mut self, f: F) -> R
where F: FnOnce(&mut Self) -> R,

Scoped with mutable reference.
§

impl<S> ServiceDyn for S
where S: Service + ?Sized,

§

fn info_dyn(&self) -> ServiceInfo

Dyn version of [Service::info].
§

fn capability_dyn(&self) -> Capability

Dyn version of [Service::capability].
§

fn create_dir_dyn<'a>( &'a self, ctx: &'a OperationContext, path: &'a str, args: OpCreateDir, ) -> Pin<Box<dyn Future<Output = Result<RpCreateDir, Error>> + Send + 'a>>

Dyn version of [Service::create_dir].
§

fn stat_dyn<'a>( &'a self, ctx: &'a OperationContext, path: &'a str, args: OpStat, ) -> Pin<Box<dyn Future<Output = Result<RpStat, Error>> + Send + 'a>>

Dyn version of [Service::stat].
§

fn read_dyn<'a>( &'a self, ctx: &'a OperationContext, path: &'a str, args: OpRead, ) -> Result<Box<dyn ReadDyn>, Error>

Dyn version of [Service::read].
§

fn write_dyn<'a>( &'a self, ctx: &'a OperationContext, path: &'a str, args: OpWrite, ) -> Result<Box<dyn WriteDyn>, Error>

Dyn version of [Service::write].
§

fn delete_dyn<'a>( &'a self, ctx: &'a OperationContext, ) -> Result<Box<dyn DeleteDyn>, Error>

Dyn version of [Service::delete].
§

fn list_dyn<'a>( &'a self, ctx: &'a OperationContext, path: &'a str, args: OpList, ) -> Result<Box<dyn ListDyn>, Error>

Dyn version of [Service::list].
§

fn copy_dyn<'a>( &'a self, ctx: &'a OperationContext, from: &'a str, to: &'a str, args: OpCopy, ) -> Result<Box<dyn CopyDyn>, Error>

Dyn version of [Service::copy].
§

fn compose_dyn<'a>( &'a self, ctx: &'a OperationContext, to: &'a str, args: OpCompose, ) -> Result<Box<dyn ComposeDyn>, Error>

Dyn version of [Service::compose].
§

fn rename_dyn<'a>( &'a self, ctx: &'a OperationContext, from: &'a str, to: &'a str, args: OpRename, ) -> Pin<Box<dyn Future<Output = Result<RpRename, Error>> + Send + 'a>>

Dyn version of [Service::rename].
§

fn restore_dyn<'a>( &'a self, ctx: &'a OperationContext, path: &'a str, args: OpRestore, ) -> Pin<Box<dyn Future<Output = Result<RpRestore, Error>> + Send + 'a>>

Dyn version of [Service::restore].
§

fn presign_dyn<'a>( &'a self, ctx: &'a OperationContext, path: &'a str, args: OpPresign, ) -> Pin<Box<dyn Future<Output = Result<RpPresign, Error>> + Send + 'a>>

Dyn version of [Service::presign].
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> Value for T
where T: Send + Sync + 'static,

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a [WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a [WithDispatch] wrapper. Read more
Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more