Skip to main content

ObjectVersionsQuery

Struct ObjectVersionsQuery 

Source
pub struct ObjectVersionsQuery {
    pub object_id: ObjectID,
    pub read_mask: FieldMaskTree,
    pub removal_read_mask: FieldMaskTree,
    pub start_checkpoint: Option<u64>,
    pub end_checkpoint: Option<u64>,
    pub descending: bool,
    pub limit: usize,
    /* private fields */
}
Expand description

What a ListObjectVersions request lists: the object, the fields to render, the order, the limit, and the bounds the request sets. Public so other implementors of LedgerService parse requests, bound listings, end them, and mint cursors the same way.

Fields§

§object_id: ObjectID§read_mask: FieldMaskTree

The fields of each listed live version to render.

§removal_read_mask: FieldMaskTree

The fields of each listed removal to render.

§start_checkpoint: Option<u64>

start_checkpoint: list only the versions written in this checkpoint or later.

§end_checkpoint: Option<u64>

end_checkpoint: list only the versions written before this checkpoint.

§descending: bool

Whether to list versions from highest to lowest.

§limit: usize

The most items, live versions and removals, one stream lists.

Implementations§

Source§

impl ObjectVersionsQuery

Source

pub fn new( request: &ListObjectVersionsRequest, default_limit: u32, max_limit: u32, ) -> Result<Self>

Parse and validate request, with options.limit defaulting to default_limit and coerced into 1..=max_limit. A malformed cursor, one for another object, an end_version below start_version, or an end_checkpoint below start_checkpoint is INVALID_ARGUMENT.

Source

pub fn lists_removal_transactions(&self) -> bool

Whether Self::removal_read_mask selects each removal’s transaction. A backend that lists removals sets ObjectVersionItem::Removal’s transaction exactly when it does, failing the listing when it cannot.

Source

pub fn has_held_after_cursor(&self, floor_checkpoint: Option<u64>) -> bool

Whether the request carries an after cursor whose client holds history right below the versions the listing lists that pruning through floor_checkpoint may have cut a gap after: an item’s cursor, whose item the client holds, or a boundary from a listing bounded by a checkpoint K below the floor, so that the lowest start_checkpoint the server accepts, the floor + 1, is above K + 1. This checkpoint rule is complete only for the boundary at version 0, below every version: its client holds what was written by the end of K, and pruning keeps every version written after the floor. A boundary above version 0 can sit at an end_version cut and vouches for nothing above it (see Self::needs_history_retained_from); the nothing-retained path and the low-start_checkpoint gate apply the checkpoint rule to it as ruled. With nothing pruned (floor_checkpoint unset), no boundary is held.

Source

pub fn starts_after_cursor(&self, start: SequenceNumber) -> bool

Whether the listing’s lowest version, start, is the one right after its after cursor, of either kind.

Source

pub fn needs_history_retained_from( &self, start: SequenceNumber, floor_checkpoint: Option<u64>, ) -> bool

Whether a server whose listing floor is floor_checkpoint must find the object’s history retained from start, the listing’s lowest version, so as not to follow the history its client holds with a gap: the listing starts right after its after cursor (see Self::starts_after_cursor), which is an item’s cursor, a boundary that pruning through the floor passed (see Self::has_held_after_cursor), or a boundary above version 0. Such a boundary can sit at an end_version cut, below versions written by its checkpoint, so it vouches for nothing above it: the history from start is retained only when the object’s version at the floor is at most one above the boundary’s version, as it is for a boundary minted at the top of its window bounded at or above the floor. The boundary at version 0, below every version, keeps the checkpoint rule.

Source

pub fn after_at_or_above(&self, version: Option<SequenceNumber>) -> bool

Whether the request’s after cursor is at or above version, the object’s version at the end of some checkpoint, so that every version the listing lists was written after that checkpoint. false without an after cursor or a version.

Source

pub fn check_some_cursor_indexed( &self, window: &CheckpointWindow, upper_bound: &AtCheckpointUpperBound, ) -> Result<()>

Fails with OUT_OF_RANGE / ABOVE_LATEST_AVAILABLE (AtCheckpointUpperBound::check_cursor, naming the lowest of their checkpoints) when the listing runs to the tip (end_checkpoint unset, or above the checkpoint after the tip) and the request has cursors, all from listings bounded by a checkpoint above upper_bound’s highest indexed one: from servers that have indexed further than this one. A cursor from a listing bounded at or below it names a version this server has indexed.

Source

pub fn floor_error( &self, floor_checkpoint: u64, upper_bound: &AtCheckpointUpperBound, ) -> RpcError

The error for a request a server whose listing floor is floor_checkpoint cannot serve because pruning took history it would list: OUT_OF_RANGE / BELOW_EARLIEST_AVAILABLE (below_serving_floor), reporting floor_checkpoint + 1, the lowest start_checkpoint it accepts, as lowestAvailableCheckpoint. A request whose after cursor comes from a listing bounded above upper_bound‘s highest indexed checkpoint, by a server that has indexed further, gets that cursor’s ABOVE_LATEST_AVAILABLE (AtCheckpointUpperBound::check_cursor) instead, which it can retry once this server catches up: ListTransactions’ floor_error_or puts the tip refusal of a request with an after cursor before the floor rules.

Source

pub fn check_checkpoint_floor( &self, floor_checkpoint: Option<u64>, upper_bound: &AtCheckpointUpperBound, version_at_floor: impl FnOnce(u64) -> Result<Option<SequenceNumber>>, ) -> Result<()>

Fails with Self::floor_error when a server whose listing floor is floor_checkpoint cannot serve the request’s checkpoint range, as ListTransactions refuses one below its floor. The lowest start_checkpoint it accepts is the checkpoint after the floor, since a range starts above the object’s version at the end of the checkpoint before it. A lower start_checkpoint is served only when an after cursor bounds the listing at or above the floor, as ListTransactions checks the start only after the cursors narrow it: the cursor is at or above version_at_floor(floor_checkpoint), the object’s version at the end of the floor checkpoint, so every version after it was written after the floor, or the object has no version there. A pruned server cannot tell whether an object without one did not exist yet or was removed at or before the floor, so it must also find the object’s history retained from the listing’s lowest version on. An end_checkpoint at or below that lowest start is refused when the listing has no lower bound of its own (neither start_checkpoint nor an after cursor). An empty range lists nothing, whatever the floor. With nothing pruned (floor_checkpoint unset), every range is served.

Source

pub fn nothing_retained(&self) -> ObjectVersionsPlan

The plan of a listing for an object of which a pruning server retains nothing up to the bounding checkpoint: it lists nothing and ends as at the object’s first version, with CHECKPOINT_BOUND.

Source

pub fn checkpoint_window( &self, upper_bound: &AtCheckpointUpperBound, ) -> Result<CheckpointWindow>

The checkpoints the listing covers, against upper_bound’s highest indexed checkpoint, the tip, as ListTransactions bounds them. A descending listing whose end_checkpoint is above the checkpoint after the tip, or whose start_checkpoint is above the tip with end_checkpoint unset, is OUT_OF_RANGE / ABOVE_LATEST_AVAILABLE (bound end_checkpoint or start_checkpoint): it would start above versions this server has not indexed. An ascending listing is never refused for its range: it runs through the tip and ends with LEDGER_TIP.

Source

pub fn plan( &self, window: &CheckpointWindow, upper_bound: &AtCheckpointUpperBound, newest_visible: Option<SequenceNumber>, newest_before_start: Option<SequenceNumber>, ) -> Result<ObjectVersionsPlan>

What the listing reads and how it ends, given newest_visible, the object’s version at the end of CheckpointWindow::bounding_checkpoint, live or not (the newest version written by then), or None if the object did not exist yet, and newest_before_start, its version at the end of CheckpointWindow::below_start (None when that is unset). The checkpoint range lists the versions above newest_before_start up to newest_visible: an object’s versions only increase from checkpoint to checkpoint, so the versions written in a checkpoint range are one version range. The cursors narrow it to the versions between their positions (see ObjectVersionCursor).

A cursor comes from a listing on any server, such as another replica that has indexed further, so it can name a version past this server’s tip: above newest_visible, or at or above [OBJECT_START_VERSION] if it is None. When the window runs to the tip (end_checkpoint unset, or above the checkpoint after the tip), the ledger List APIs’ rules apply to such a cursor:

  • Descending, it is AtCheckpointUpperBound::unindexed_cursor_error, whatever the version range: listing from this server’s view would start below versions it lacks. A before at the version right after newest_visible leaves none between them, so it is served. With newest_visible None, that version is [OBJECT_START_VERSION], the first an object can have, so the boundary at version 0, which a listing of the object that lists nothing mints, is served back as either cursor, unless every cursor of the request comes from a listing bounded above the tip (see Self::check_some_cursor_indexed).
  • Ascending, the listing is served from this server’s view, which holds nothing above the tip. If its window reaches past the tip (see LEDGER_TIP below), an after past the tip lists nothing and ends with LEDGER_TIP, where the client resumes from the cursor it holds, with CURSOR_BOUND if before is at or below the version after after, leaving nothing between them, or with CHECKPOINT_BOUND if end_version is. A window that ends at or below the tip ends by the rules below. A before past the tip leaves the tip as the listing’s end.

A listing with an indexed end_checkpoint stops at it, so every cursor is safe to page from. An empty checkpoint range lists nothing. It ends with CHECKPOINT_BOUND when end_checkpoint - 1 is indexed; ascending above the tip, it ends with LEDGER_TIP, as ListTransactions does.

The listing ends where its range does, at the bound the ledger List APIs would name:

  • The far cursor in listing order ends it with CURSOR_BOUND when the version it names is inside the request’s window (start_version, end_version and the versions written in the checkpoint range) or at its edge: before at or below the window’s end ascending, after at or above its start descending.
  • Otherwise an ascending listing whose window runs to the tip and reaches past the object’s newest version (end_version unset, or above both the version after it and start_version) ends with LEDGER_TIP, since versions written later extend it, even when its after cursor leaves nothing to list: a client following an object’s new versions resumes from its newest version’s cursor.
  • Every other listing ends at the edge of the window the request set, with CHECKPOINT_BOUND, including one whose starting cursor (after ascending, before descending) sits at or past that edge.
Source

pub fn end_cursor( &self, plan: &ObjectVersionsPlan, bounding_checkpoint: u64, ) -> Bytes

The cursor the last frame of a listing that plan plans resumes from, when the listing ends with its planned reason, bounded by bounding_checkpoint: a request in the same order resumes from it.

  • CURSOR_BOUND: the far cursor (before ascending, after descending), unchanged.
  • The starting cursor (after ascending, before descending), unchanged, when it sits at or past the window’s edge, so the listing reached nothing. That includes an ascending after past the tip.
  • Otherwise the window’s edge, which is what the listing reached, as an ObjectVersionCursor::Boundary: ascending, the boundary below the window’s end, above which after lists what the window left; descending, the boundary below the window’s lowest version, at or below which before lists, or above newest_visible when the window lies wholly above it. Versions written later land on the far side of the boundary from what the listing reached, whichever order resumes from it.
Source

pub fn cursor(&self, version: u64, bounding_checkpoint: u64) -> Bytes

The cursor of the item at version, minted by a listing bounded by bounding_checkpoint.

Source

pub fn boundary_cursor(&self, version: u64, bounding_checkpoint: u64) -> Bytes

The cursor of the boundary between version and the version after it, minted by a listing bounded by bounding_checkpoint.

Source

pub fn frames( &self, bounding_checkpoint: u64, listed: BoxStream<'static, Result<ObjectVersionItem>>, end: QueryEndReason, end_cursor: impl Future<Output = Bytes> + Send + 'static, ) -> ObjectVersionFrames

The frames of a listing bounded by bounding_checkpoint (see CheckpointWindow::bounding_checkpoint) whose items listed yields in listing order. Each item goes out on its own frame, whose cursor is the item’s: a live version as object, a removal as removal with the fields Self::removal_read_mask selects. The frame with the Self::limitth item ends the stream with ITEM_LIMIT, whatever end says, and listed is not polled again. A listed that ends first is followed by a final frame ending with end, whose cursor end_cursor resolves to once listed has ended (see Self::end_cursor), so a listing with no items still returns a resume cursor. An error listed yields ends the stream with it.

Trait Implementations§

Source§

impl Clone for ObjectVersionsQuery

Source§

fn clone(&self) -> ObjectVersionsQuery

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for ObjectVersionsQuery

Source§

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

Formats the value using the given formatter. 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<T> Any for T
where T: Any,

§

fn into_any(self: Box<T>) -> Box<dyn Any>

§

fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>

§

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

§

impl<T> AnySync for T
where T: Any + Send + Sync,

§

fn into_any_arc(self: Arc<T>) -> Arc<dyn Any + Send + Sync> ⓘ

§

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<'a, T, E> AsTaggedExplicit<'a, E> for T
where T: 'a,

§

fn explicit(self, class: Class, tag: u32) -> TaggedParser<'a, Explicit, Self, E>

§

impl<'a, T, E> AsTaggedImplicit<'a, E> for T
where T: 'a,

§

fn implicit( self, class: Class, constructed: bool, tag: u32, ) -> TaggedParser<'a, Implicit, Self, E>

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> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
§

impl<T> Conv for T

§

fn conv<T>(self) -> T
where Self: Into<T>,

Converts self into T using Into<T>. Read more
Source§

impl<T> DynClone for T
where T: Clone,

Source§

fn __clone_box(&self, _: Private) -> *mut ()

§

impl<T> ErasedDestructor for T
where T: 'static,

§

impl<T> FmtForward for T

§

fn fmt_binary(self) -> FmtBinary<Self>
where Self: Binary,

Causes self to use its Binary implementation when Debug-formatted.
§

fn fmt_display(self) -> FmtDisplay<Self>
where Self: Display,

Causes self to use its Display implementation when Debug-formatted.
§

fn fmt_lower_exp(self) -> FmtLowerExp<Self>
where Self: LowerExp,

Causes self to use its LowerExp implementation when Debug-formatted.
§

fn fmt_lower_hex(self) -> FmtLowerHex<Self>
where Self: LowerHex,

Causes self to use its LowerHex implementation when Debug-formatted.
§

fn fmt_octal(self) -> FmtOctal<Self>
where Self: Octal,

Causes self to use its Octal implementation when Debug-formatted.
§

fn fmt_pointer(self) -> FmtPointer<Self>
where Self: Pointer,

Causes self to use its Pointer implementation when Debug-formatted.
§

fn fmt_upper_exp(self) -> FmtUpperExp<Self>
where Self: UpperExp,

Causes self to use its UpperExp implementation when Debug-formatted.
§

fn fmt_upper_hex(self) -> FmtUpperHex<Self>
where Self: UpperHex,

Causes self to use its UpperHex implementation when Debug-formatted.
§

fn fmt_list(self) -> FmtList<Self>
where &'a Self: for<'a> IntoIterator,

Formats each item in a sequence. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

§

impl<T> FromRef<T> for T
where T: Clone,

§

fn from_ref(input: &T) -> T

Converts to this type from a reference to the input type.
§

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, 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 Request
§

impl<T> IntoRequest<T> for T

§

fn into_request(self) -> Request<T>

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

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].
§

impl<T> MaybeSendSync for T

§

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

§

fn pipe<R>(self, func: impl FnOnce(Self) -> R) -> R
where Self: Sized,

Pipes by value. This is generally the method you want to use. Read more
§

fn pipe_ref<'a, R>(&'a self, func: impl FnOnce(&'a Self) -> R) -> R
where R: 'a,

Borrows self and passes that borrow into the pipe function. Read more
§

fn pipe_ref_mut<'a, R>(&'a mut self, func: impl FnOnce(&'a mut Self) -> R) -> R
where R: 'a,

Mutably borrows self and passes that borrow into the pipe function. Read more
§

fn pipe_borrow<'a, B, R>(&'a self, func: impl FnOnce(&'a B) -> R) -> R
where Self: Borrow<B>, B: 'a + ?Sized, R: 'a,

Borrows self, then passes self.borrow() into the pipe function. Read more
§

fn pipe_borrow_mut<'a, B, R>( &'a mut self, func: impl FnOnce(&'a mut B) -> R, ) -> R
where Self: BorrowMut<B>, B: 'a + ?Sized, R: 'a,

Mutably borrows self, then passes self.borrow_mut() into the pipe function. Read more
§

fn pipe_as_ref<'a, U, R>(&'a self, func: impl FnOnce(&'a U) -> R) -> R
where Self: AsRef<U>, U: 'a + ?Sized, R: 'a,

Borrows self, then passes self.as_ref() into the pipe function.
§

fn pipe_as_mut<'a, U, R>(&'a mut self, func: impl FnOnce(&'a mut U) -> R) -> R
where Self: AsMut<U>, U: 'a + ?Sized, R: 'a,

Mutably borrows self, then passes self.as_mut() into the pipe function.
§

fn pipe_deref<'a, T, R>(&'a self, func: impl FnOnce(&'a T) -> R) -> R
where Self: Deref<Target = T>, T: 'a + ?Sized, R: 'a,

Borrows self, then passes self.deref() into the pipe function.
§

fn pipe_deref_mut<'a, T, R>( &'a mut self, func: impl FnOnce(&'a mut T) -> R, ) -> R
where Self: DerefMut<Target = T> + Deref, T: 'a + ?Sized, R: 'a,

Mutably borrows self, then passes self.deref_mut() into the pipe function.
§

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

§

fn propagate_header(self, header: HeaderName) -> PropagateHeader<Self>
where Self: Sized,

Propagate a header from the request to the response. Read more
§

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

Add some shareable value to request extensions. Read more
§

fn map_request_body<F>(self, f: F) -> MapRequestBody<Self, F>
where Self: Sized,

Apply a transformation to the request body. Read more
§

fn map_response_body<F>(self, f: F) -> MapResponseBody<Self, F>
where Self: Sized,

Apply a transformation to the response body. Read more
§

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

Compresses response bodies. Read more
§

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

Decompress response bodies. Read more
§

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

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

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

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

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

Follow redirect resposes using the Standard policy. Read more
§

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
§

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

Mark headers as sensitive on requests. Read more
§

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

Mark headers as sensitive on responses. Read more
§

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
§

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
§

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
§

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
§

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
§

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
§

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
§

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
§

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

Propgate request ids from requests to responses. Read more
§

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
§

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

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

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
§

fn trim_trailing_slash(self) -> NormalizePath<Self>
where Self: Sized,

Remove trailing slashes from paths. Read more
§

fn append_trailing_slash(self) -> NormalizePath<Self>
where Self: Sized,

Append trailing slash to paths. Read more
§

impl<T> Tap for T

§

fn tap(self, func: impl FnOnce(&Self)) -> Self

Immutable access to a value. Read more
§

fn tap_mut(self, func: impl FnOnce(&mut Self)) -> Self

Mutable access to a value. Read more
§

fn tap_borrow<B>(self, func: impl FnOnce(&B)) -> Self
where Self: Borrow<B>, B: ?Sized,

Immutable access to the Borrow<B> of a value. Read more
§

fn tap_borrow_mut<B>(self, func: impl FnOnce(&mut B)) -> Self
where Self: BorrowMut<B>, B: ?Sized,

Mutable access to the BorrowMut<B> of a value. Read more
§

fn tap_ref<R>(self, func: impl FnOnce(&R)) -> Self
where Self: AsRef<R>, R: ?Sized,

Immutable access to the AsRef<R> view of a value. Read more
§

fn tap_ref_mut<R>(self, func: impl FnOnce(&mut R)) -> Self
where Self: AsMut<R>, R: ?Sized,

Mutable access to the AsMut<R> view of a value. Read more
§

fn tap_deref<T>(self, func: impl FnOnce(&T)) -> Self
where Self: Deref<Target = T>, T: ?Sized,

Immutable access to the Deref::Target of a value. Read more
§

fn tap_deref_mut<T>(self, func: impl FnOnce(&mut T)) -> Self
where Self: DerefMut<Target = T> + Deref, T: ?Sized,

Mutable access to the Deref::Target of a value. Read more
§

fn tap_dbg(self, func: impl FnOnce(&Self)) -> Self

Calls .tap() only in debug builds, and is erased in release builds.
§

fn tap_mut_dbg(self, func: impl FnOnce(&mut Self)) -> Self

Calls .tap_mut() only in debug builds, and is erased in release builds.
§

fn tap_borrow_dbg<B>(self, func: impl FnOnce(&B)) -> Self
where Self: Borrow<B>, B: ?Sized,

Calls .tap_borrow() only in debug builds, and is erased in release builds.
§

fn tap_borrow_mut_dbg<B>(self, func: impl FnOnce(&mut B)) -> Self
where Self: BorrowMut<B>, B: ?Sized,

Calls .tap_borrow_mut() only in debug builds, and is erased in release builds.
§

fn tap_ref_dbg<R>(self, func: impl FnOnce(&R)) -> Self
where Self: AsRef<R>, R: ?Sized,

Calls .tap_ref() only in debug builds, and is erased in release builds.
§

fn tap_ref_mut_dbg<R>(self, func: impl FnOnce(&mut R)) -> Self
where Self: AsMut<R>, R: ?Sized,

Calls .tap_ref_mut() only in debug builds, and is erased in release builds.
§

fn tap_deref_dbg<T>(self, func: impl FnOnce(&T)) -> Self
where Self: Deref<Target = T>, T: ?Sized,

Calls .tap_deref() only in debug builds, and is erased in release builds.
§

fn tap_deref_mut_dbg<T>(self, func: impl FnOnce(&mut T)) -> Self
where Self: DerefMut<Target = T> + Deref, T: ?Sized,

Calls .tap_deref_mut() only in debug builds, and is erased in release builds.
§

impl<T> ToAst for T

§

fn ast(self, begin: usize, end: usize) -> Spanned<Self>

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
§

impl<T> TryConv for T

§

fn try_conv<T>(self) -> Result<T, Self::Error>
where Self: TryInto<T>,

Attempts to convert self into T using TryInto<T>. 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.
§

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

§

fn vzip(self) -> V

§

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