Skip to main content

Transaction

Struct Transaction 

Source
pub struct Transaction { /* private fields */ }

Implementations§

Source§

impl Transaction

Source

pub async fn export( &self, ns: &str, db: &str, cfg: Config, chn: Sender<Vec<u8>>, ) -> Result<(), Error>

Writes the full database contents as binary SQL.

Source§

impl Transaction

Source

pub fn new( local: bool, sequences: Sequences, async_event_trigger: Arc<Notify>, tr: Transactor, ) -> Transaction

Create a new query store

Source

pub fn is_local(&self) -> bool

Check if the transaction is local or remote

Source

pub fn enclose(self) -> Arc<Transaction>

Enclose this transaction in an Arc

Source

pub fn closed(&self) -> bool

Check if the transaction is finished.

If the transaction has been cancelled or committed, then this function will return true, and any further calls to functions on this transaction will result in a crate::kvs::Error::TransactionFinished error.

Source

pub async fn cancel(&self) -> Result<(), Error>

Cancel a transaction.

This reverses all changes made within the transaction.

Source

pub async fn commit(&self) -> Result<(), Error>

Commit a transaction.

This attempts to commit all changes made within the transaction.

Source

pub async fn exists<K>( &self, key: &K, version: Option<u64>, ) -> Result<bool, Error>
where K: KVKey + Debug,

Check if a key exists in the datastore.

Source

pub async fn get<K>( &self, key: &K, version: Option<u64>, ) -> Result<Option<<K as KVKey>::ValueType>, Error>
where K: KVKey + Debug,

Fetch a key from the datastore.

Source

pub async fn getm<K>( &self, keys: Vec<K>, version: Option<u64>, ) -> Result<Vec<Option<<K as KVKey>::ValueType>>, Error>
where K: KVKey + Debug,

Retrieve a batch set of keys from the datastore.

Source

pub async fn getp<K>( &self, key: &K, ) -> Result<Vec<(Vec<u8>, <K as KVKey>::ValueType)>, Error>
where K: KVKey + Debug,

Retrieve a specific prefix of keys from the datastore.

This function fetches key-value pairs from the underlying datastore in grouped batches.

Source

pub async fn getr<K>( &self, rng: Range<K>, version: Option<u64>, ) -> Result<Vec<(Vec<u8>, <K as KVKey>::ValueType)>, Error>
where K: KVKey + Debug,

Retrieve a specific range of keys from the datastore.

This function fetches key-value pairs from the underlying datastore in grouped batches.

Source

pub async fn del<K>(&self, key: &K) -> Result<(), Error>
where K: KVKey + Debug,

Delete a key from the datastore.

Source

pub async fn delc<K>( &self, key: &K, chk: Option<&<K as KVKey>::ValueType>, ) -> Result<(), Error>
where K: KVKey + Debug,

Delete a key from the datastore if the current value matches a condition.

Source

pub async fn delr<K>(&self, rng: Range<K>) -> Result<(), Error>
where K: KVKey + Debug,

Delete a range of keys from the datastore.

This function deletes entries from the underlying datastore in grouped batches.

Source

pub async fn delp<K>(&self, key: &K) -> Result<(), Error>
where K: KVKey + Debug,

Delete a prefix of keys from the datastore.

This function deletes entries from the underlying datastore in grouped batches.

Source

pub async fn clr<K>(&self, key: &K) -> Result<(), Error>
where K: KVKey + Debug,

Delete all versions of a key from the datastore.

Source

pub async fn clrc<K>( &self, key: &K, chk: Option<&<K as KVKey>::ValueType>, ) -> Result<(), Error>
where K: KVKey + Debug,

Delete all versions of a key from the datastore if the current value matches a condition.

Source

pub async fn clrr<K>(&self, rng: Range<K>) -> Result<(), Error>
where K: KVKey + Debug,

Delete all versions of a range of keys from the datastore.

This function deletes entries from the underlying datastore in grouped batches.

Source

pub async fn clrp<K>(&self, key: &K) -> Result<(), Error>
where K: KVKey + Debug,

Delete all versions of a prefix of keys from the datastore.

This function deletes entries from the underlying datastore in grouped batches.

Source

pub async fn set<K>( &self, key: &K, val: &<K as KVKey>::ValueType, version: Option<u64>, ) -> Result<(), Error>
where K: KVKey + Debug,

Insert or update a key in the datastore.

Source

pub async fn put<K>( &self, key: &K, val: &<K as KVKey>::ValueType, version: Option<u64>, ) -> Result<(), Error>
where K: KVKey + Debug,

Insert a key if it doesn’t exist in the datastore.

Source

pub async fn putc<K>( &self, key: &K, val: &<K as KVKey>::ValueType, chk: Option<&<K as KVKey>::ValueType>, ) -> Result<(), Error>
where K: KVKey + Debug,

Update a key in the datastore if the current value matches a condition.

Source

pub async fn replace<K>( &self, key: &K, val: &<K as KVKey>::ValueType, ) -> Result<(), Error>
where K: KVKey + Debug,

Insert or replace a key in the datastore.

Source

pub async fn keys<K>( &self, rng: Range<K>, limit: u32, skip: u32, version: Option<u64>, ) -> Result<Vec<Vec<u8>>, Error>
where K: KVKey + Debug,

Retrieve a specific range of keys from the datastore.

This function fetches the full range of keys, in a single request to the underlying datastore.

Source

pub async fn keysr<K>( &self, rng: Range<K>, limit: u32, skip: u32, version: Option<u64>, ) -> Result<Vec<Vec<u8>>, Error>
where K: KVKey + Debug,

Retrieve a specific range of keys from the datastore in reverse order.

This function fetches the full range of keys, in a single request to the underlying datastore.

Source

pub async fn scan<K>( &self, rng: Range<K>, limit: u32, skip: u32, version: Option<u64>, ) -> Result<Vec<(Vec<u8>, Vec<u8>)>, Error>
where K: KVKey + Debug,

Retrieve a specific range of keys from the datastore.

This function fetches the full range of key-value pairs, in a single request to the underlying datastore.

Source

pub async fn scanr<K>( &self, rng: Range<K>, limit: u32, skip: u32, version: Option<u64>, ) -> Result<Vec<(Vec<u8>, Vec<u8>)>, Error>
where K: KVKey + Debug,

Source

pub async fn count<K>( &self, rng: Range<K>, version: Option<u64>, ) -> Result<usize, Error>
where K: KVKey + Debug,

Count the total number of keys within a range in the datastore.

This function fetches the total count, in batches, with multiple requests to the underlying datastore.

Source

pub async fn batch_keys<K>( &self, rng: Range<K>, batch: u32, version: Option<u64>, ) -> Result<Batch<Vec<u8>>, Error>
where K: KVKey + Debug,

Retrieve a batched scan over a specific range of keys in the datastore.

This function fetches the keys in batches, with multiple requests to the underlying datastore.

Source

pub async fn batch_keys_vals<K>( &self, rng: Range<K>, batch: u32, version: Option<u64>, ) -> Result<Batch<(Vec<u8>, Vec<u8>)>, Error>
where K: KVKey + Debug,

Retrieve a batched scan over a specific range of keys in the datastore.

This function fetches the key-value pairs in batches, with multiple requests to the underlying datastore.

Source

pub fn stream_keys( &self, rng: Range<Vec<u8>>, version: Option<u64>, limit: Option<usize>, skip: u32, dir: ScanDirection, ) -> impl Stream<Item = Result<Vec<Vec<u8>>, Error>>

Retrieve a stream of key batches over a specific range in the datastore.

This function returns a stream that yields batches of keys. The scanner:

  • Fetches an initial batch of up to 100 items
  • Fetches subsequent batches of up to 16 MiB (local) or 4 MiB (remote)
  • Prefetches the next batch while the current batch is being processed
Source

pub fn stream_keys_vals( &self, rng: Range<Vec<u8>>, version: Option<u64>, limit: Option<usize>, skip: u32, dir: ScanDirection, prefetch: bool, ) -> impl Stream<Item = Result<Vec<(Vec<u8>, Vec<u8>)>, Error>>

Retrieve a stream of key-value batches over a specific range in the datastore.

This function returns a stream that yields batches of key-value pairs. The scanner:

  • Fetches an initial batch of up to 100 items (or 500 when prefetch is enabled)
  • Fetches subsequent batches of up to 16 MiB (local) or 4 MiB (remote)
  • When prefetch is true, prefetches the next batch while the current batch is being processed, and uses a larger initial batch size (500 items)
Source

pub async fn new_save_point(&self) -> Result<(), Error>

Set a new save point on the transaction.

Source

pub async fn release_last_save_point(&self) -> Result<(), Error>

Release the last save point.

Source

pub async fn rollback_to_save_point(&self) -> Result<(), Error>

Rollback to the last save point.

Source

pub async fn timestamp(&self) -> Result<BoxTimeStamp, Error>

Get the current monotonic timestamp

Source

pub fn timestamp_impl(&self) -> Box<dyn TimeStampImpl>

Returns the implementation of timestamp that this transaction uses.

Source

pub fn clear_cache(&self)

Clears all keys from the transaction cache.

Source

pub async fn compact<K>(&self, prefix_key: Option<K>) -> Result<(), Error>
where K: KVKey + Debug,

Methods from Deref<Target = Transactor>§

Source

pub fn closed(&self) -> bool

Check if transaction is finished.

If the transaction has been cancelled or committed, then this function will return true, and any further calls to functions on this transaction will result in a crate::kvs::Error::TransactionFinished error.

Source

pub fn writeable(&self) -> bool

Check if transaction is writeable.

If the transaction has been marked as a writeable transaction, then this function will return true. This fuction can be used to check whether a transaction allows data to be modified, and if not then the function will return a crate::kvs::Error::TransactionReadonly error when attempting to modify any data within the transaction.

Source

pub async fn cancel(&self) -> Result<(), Error>

Cancel a transaction.

This reverses all changes made within the transaction.

Source

pub async fn commit(&self) -> Result<(), Error>

Commit a transaction.

This attempts to commit all changes made within the transaction.

Source

pub async fn exists<K>( &self, key: K, version: Option<u64>, ) -> Result<bool, Error>
where K: IntoBytes + Debug,

Check if a key exists in the datastore.

Source

pub async fn get<K>( &self, key: K, version: Option<u64>, ) -> Result<Option<Vec<u8>>, Error>
where K: IntoBytes + Debug,

Fetch a key from the datastore.

Source

pub async fn getm<K>( &self, keys: Vec<K>, version: Option<u64>, ) -> Result<Vec<Option<Vec<u8>>>, Error>
where K: IntoBytes + Debug,

Fetch many keys from the datastore.

Source

pub async fn getp<K>(&self, key: K) -> Result<Vec<(Vec<u8>, Vec<u8>)>, Error>
where K: IntoBytes + Debug,

Retrieve a specific prefixed range of keys from the datastore.

This function fetches all matching key-value pairs from the underlying datastore in grouped batches.

Source

pub async fn getr<K>( &self, rng: Range<K>, version: Option<u64>, ) -> Result<Vec<(Vec<u8>, Vec<u8>)>, Error>
where K: IntoBytes + Debug,

Retrieve a specific range of keys from the datastore.

This function fetches all matching key-value pairs from the underlying datastore in grouped batches.

Source

pub async fn set<K, V>( &self, key: K, val: V, version: Option<u64>, ) -> Result<(), Error>
where K: IntoBytes + Debug, V: IntoBytes + Debug,

Insert or update a key in the datastore.

Source

pub async fn replace<K, V>(&self, key: K, val: V) -> Result<(), Error>
where K: IntoBytes + Debug, V: IntoBytes + Debug,

Insert or replace a key in the datastore.

Source

pub async fn put<K, V>( &self, key: K, val: V, version: Option<u64>, ) -> Result<(), Error>
where K: IntoBytes + Debug, V: IntoBytes + Debug,

Insert a key if it doesn’t exist in the datastore.

Source

pub async fn putc<K, V>( &self, key: K, val: V, chk: Option<V>, ) -> Result<(), Error>
where K: IntoBytes + Debug, V: IntoBytes + Debug,

Update a key in the datastore if the current value matches a condition.

Source

pub async fn del<K>(&self, key: K) -> Result<(), Error>
where K: IntoBytes + Debug,

Delete a key from the datastore.

Source

pub async fn delc<K, V>(&self, key: K, chk: Option<V>) -> Result<(), Error>
where K: IntoBytes + Debug, V: IntoBytes + Debug,

Delete a key from the datastore if the current value matches a condition.

Source

pub async fn delp<K>(&self, key: K) -> Result<(), Error>
where K: IntoBytes + Debug,

Delete a prefixed range of keys from the datastore.

This function deletes all matching key-value pairs from the underlying datastore in grouped batches.

Source

pub async fn delr<K>(&self, rng: Range<K>) -> Result<(), Error>
where K: IntoBytes + Debug,

Delete a range of keys from the datastore.

This function deletes all matching key-value pairs from the underlying datastore in grouped batches.

Source

pub async fn clr<K>(&self, key: K) -> Result<(), Error>
where K: IntoBytes + Debug,

Delete all versions of a key from the datastore.

Source

pub async fn clrc<K, V>(&self, key: K, chk: Option<V>) -> Result<(), Error>
where K: IntoBytes + Debug, V: IntoBytes + Debug,

Delete all versions of a key from the datastore if the current value matches a condition.

Source

pub async fn clrp<K>(&self, key: K) -> Result<(), Error>
where K: IntoBytes + Debug,

Delete all versions of a prefixed range of keys from the datastore.

This function deletes all matching key-value pairs from the underlying datastore in grouped batches.

Source

pub async fn clrr<K>(&self, rng: Range<K>) -> Result<(), Error>
where K: IntoBytes + Debug,

Delete all versions of a range of keys from the datastore.

This function deletes all matching key-value pairs from the underlying datastore in grouped batches.

Source

pub async fn keys<K>( &self, rng: Range<K>, limit: ScanLimit, skip: u32, version: Option<u64>, ) -> Result<Vec<Vec<u8>>, Error>
where K: IntoBytes + Debug,

Retrieve a specific range of keys from the datastore.

This function fetches the full range of keys without values, in a single request to the underlying datastore.

Source

pub async fn keysr<K>( &self, rng: Range<K>, limit: ScanLimit, skip: u32, version: Option<u64>, ) -> Result<Vec<Vec<u8>>, Error>
where K: IntoBytes + Debug,

Retrieve a specific range of keys from the datastore.

This function fetches the full range of keys without values, in a single request to the underlying datastore.

Source

pub async fn scan<K>( &self, rng: Range<K>, limit: ScanLimit, skip: u32, version: Option<u64>, ) -> Result<Vec<(Vec<u8>, Vec<u8>)>, Error>
where K: IntoBytes + Debug,

Retrieve a specific range of key-value pairs from the datastore.

This function fetches the full range of key-value pairs, in a single request to the underlying datastore.

Source

pub async fn scanr<K>( &self, rng: Range<K>, limit: ScanLimit, skip: u32, version: Option<u64>, ) -> Result<Vec<(Vec<u8>, Vec<u8>)>, Error>
where K: IntoBytes + Debug,

Retrieve a specific range of key-value pairs from the datastore.

This function fetches the full range of key-value pairs, in a single request to the underlying datastore.

Source

pub async fn count<K>( &self, rng: Range<K>, version: Option<u64>, ) -> Result<usize, Error>
where K: IntoBytes + Debug,

Count the total number of keys within a range in the datastore.

This function fetches the total count, in batches, with multiple requests to the underlying datastore.

Source

pub async fn batch_keys<K>( &self, rng: Range<K>, batch: u32, version: Option<u64>, ) -> Result<Batch<Vec<u8>>, Error>
where K: IntoBytes + Debug,

Retrieve a batched scan over a specific range of keys in the datastore.

This function fetches keys, in batches, with multiple requests to the underlying datastore.

Source

pub async fn batch_keys_vals<K>( &self, rng: Range<K>, batch: u32, version: Option<u64>, ) -> Result<Batch<(Vec<u8>, Vec<u8>)>, Error>
where K: IntoBytes + Debug,

Retrieve a batched scan over a specific range of keys in the datastore.

This function fetches key-value pairs, in batches, with multiple requests to the underlying datastore.

Source

pub fn stream_keys<K>( &self, rng: Range<K>, version: Option<u64>, limit: Option<usize>, skip: u32, dir: Direction, ) -> impl Stream<Item = Result<Vec<Vec<u8>>, Error>>
where K: IntoBytes + Debug,

Retrieve a stream of key batches over a specific range in the datastore.

This function returns a stream that yields batches of keys. The scanner:

  • Fetches an initial batch of up to 500 items
  • Fetches subsequent batches of up to 16 MiB (local) or 4 MiB (remote)
  • Prefetches the next batch while the current batch is being processed
Source

pub fn stream_keys_vals<K>( &self, rng: Range<K>, version: Option<u64>, limit: Option<usize>, skip: u32, dir: Direction, prefetch: bool, ) -> impl Stream<Item = Result<Vec<(Vec<u8>, Vec<u8>)>, Error>>
where K: IntoBytes + Debug,

Retrieve a stream of key-value batches over a specific range in the datastore.

This function returns a stream that yields batches of key-value pairs. The scanner:

  • Fetches an initial batch of up to 500 items (or 1000 when prefetch is enabled)
  • Fetches subsequent batches of up to 16 MiB (local) or 4 MiB (remote)
  • When prefetch is true, prefetches the next batch while the current batch is being processed, and uses a larger initial batch size (500 items)
Source

pub async fn new_save_point(&self) -> Result<(), Error>

Set a new save point on the transaction.

Source

pub async fn release_last_save_point(&self) -> Result<(), Error>

Release the last save point.

Source

pub async fn rollback_to_save_point(&self) -> Result<(), Error>

Rollback to the last save point.

Source

pub async fn timestamp(&self) -> Result<BoxTimeStamp, Error>

Get the current monotonic timestamp

Source

pub fn timestamp_impl(&self) -> Box<dyn TimeStampImpl>

Returns the implementation of timestamp that this transaction uses.

Trait Implementations§

Source§

impl Deref for Transaction

Source§

type Target = Transactor

The resulting type after dereferencing.
Source§

fn deref(&self) -> &<Transaction as Deref>::Target

Dereferences the value.
Source§

impl From<Transaction> for Context

Source§

fn from(txn: Transaction) -> Context

Converts to this type from the input type.

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

impl<U> As for U

Source§

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

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

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> FutureExt for T

Source§

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

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

fn with_current_context(self) -> WithContext<Self>

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

impl<T> GetSetFdFlags for T

Source§

fn get_fd_flags(&self) -> Result<FdFlags, Error>
where T: AsFilelike,

Query the “status” flags for the self file descriptor.
Source§

fn new_set_fd_flags(&self, fd_flags: FdFlags) -> Result<SetFdFlags<T>, Error>
where T: AsFilelike,

Create a new SetFdFlags value for use with set_fd_flags. Read more
Source§

fn set_fd_flags(&mut self, set_fd_flags: SetFdFlags<T>) -> Result<(), Error>
where T: AsFilelike,

Set the “status” flags for the self file descriptor. 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
Source§

impl<T> IntoRequest<T> for T

Source§

fn into_request(self) -> Request<T>

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

impl<L> LayerExt<L> for L

Source§

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> Pointable for T

Source§

const ALIGN: usize

The alignment of pointer.
Source§

type Init = T

The type for initializers.
Source§

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

Initializes a with the given initializer. Read more
Source§

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

Dereferences the given pointer. Read more
Source§

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

Mutably dereferences the given pointer. Read more
Source§

unsafe fn drop(ptr: usize)

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

impl<T> Pointee for T

Source§

type Pointer = u32

Source§

fn debug( pointer: <T as Pointee>::Pointer, f: &mut Formatter<'_>, ) -> Result<(), Error>

Source§

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

Source§

fn and<P, B, E>(self, other: P) -> And<T, P>
where T: 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
Source§

fn or<P, B, E>(self, other: P) -> Or<T, P>
where T: 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<P, T> Receiver for P
where P: Deref<Target = T> + ?Sized, T: ?Sized,

Source§

type Target = T

🔬This is a nightly-only experimental API. (arbitrary_self_types)
The target type on which the method may be called.
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ServiceExt for T

Source§

fn add_extension<T>(self, value: T) -> AddExtension<Self, T>
where Self: Sized,

Add some shareable value to request extensions. Read more
Source§

fn compression(self) -> Compression<Self>
where Self: Sized,

Compresses response bodies. Read more
Source§

fn decompression(self) -> Decompression<Self>
where Self: Sized,

Decompress response bodies. Read more
Source§

fn trace_for_http(self) -> Trace<Self, SharedClassifier<ServerErrorsAsFailures>>
where Self: Sized,

High level tracing that classifies responses using HTTP status codes. Read more
Source§

fn trace_for_grpc(self) -> Trace<Self, SharedClassifier<GrpcErrorsAsFailures>>
where Self: Sized,

High level tracing that classifies responses using gRPC headers. Read more
Source§

fn follow_redirects(self) -> FollowRedirect<Self>
where Self: Sized,

Follow redirect resposes using the Standard policy. Read more
Source§

fn sensitive_headers( self, headers: impl IntoIterator<Item = HeaderName>, ) -> SetSensitiveRequestHeaders<SetSensitiveResponseHeaders<Self>>
where Self: Sized,

Mark headers as sensitive on both requests and responses. Read more
Source§

fn sensitive_request_headers( self, headers: impl IntoIterator<Item = HeaderName>, ) -> SetSensitiveRequestHeaders<Self>
where Self: Sized,

Mark headers as sensitive on requests. Read more
Source§

fn sensitive_response_headers( self, headers: impl IntoIterator<Item = HeaderName>, ) -> SetSensitiveResponseHeaders<Self>
where Self: Sized,

Mark headers as sensitive on responses. Read more
Source§

fn override_request_header<M>( self, header_name: HeaderName, make: M, ) -> SetRequestHeader<Self, M>
where Self: Sized,

Insert a header into the request. Read more
Source§

fn append_request_header<M>( self, header_name: HeaderName, make: M, ) -> SetRequestHeader<Self, M>
where Self: Sized,

Append a header into the request. Read more
Source§

fn insert_request_header_if_not_present<M>( self, header_name: HeaderName, make: M, ) -> SetRequestHeader<Self, M>
where Self: Sized,

Insert a header into the request, if the header is not already present. Read more
Source§

fn override_response_header<M>( self, header_name: HeaderName, make: M, ) -> SetResponseHeader<Self, M>
where Self: Sized,

Insert a header into the response. Read more
Source§

fn append_response_header<M>( self, header_name: HeaderName, make: M, ) -> SetResponseHeader<Self, M>
where Self: Sized,

Append a header into the response. Read more
Source§

fn insert_response_header_if_not_present<M>( self, header_name: HeaderName, make: M, ) -> SetResponseHeader<Self, M>
where Self: Sized,

Insert a header into the response, if the header is not already present. Read more
Source§

fn set_request_id<M>( self, header_name: HeaderName, make_request_id: M, ) -> SetRequestId<Self, M>
where Self: Sized, M: MakeRequestId,

Add request id header and extension. Read more
Source§

fn set_x_request_id<M>(self, make_request_id: M) -> SetRequestId<Self, M>
where Self: Sized, M: MakeRequestId,

Add request id header and extension, using x-request-id as the header name. Read more
Source§

fn propagate_request_id( self, header_name: HeaderName, ) -> PropagateRequestId<Self>
where Self: Sized,

Propgate request ids from requests to responses. Read more
Source§

fn propagate_x_request_id(self) -> PropagateRequestId<Self>
where Self: Sized,

Propgate request ids from requests to responses, using x-request-id as the header name. Read more
Source§

fn catch_panic(self) -> CatchPanic<Self, DefaultResponseForPanic>
where Self: Sized,

Catch panics and convert them into 500 Internal Server responses. Read more
Source§

fn request_body_limit(self, limit: usize) -> RequestBodyLimit<Self>
where Self: Sized,

Intercept requests with over-sized payloads and convert them into 413 Payload Too Large responses. Read more
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.
Source§

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

Source§

fn vzip(self) -> V

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

impl<G1, G2> Within<G2> for G1
where G2: Contains<G1>,

Source§

fn is_within(&self, b: &G2) -> bool

Source§

impl<G1, G2> Within<G2> for G1
where G2: Contains<G1>,

Source§

fn is_within(&self, b: &G2) -> bool

Source§

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