pub struct PathMapping {
pub bucket_segments: usize,
pub bucket_separator: String,
pub display_bucket_segments: usize,
}Expand description
Defines how URL path segments map to internal bucket names.
Fields§
§bucket_segments: usizeNumber of path segments that form the “bucket” portion.
E.g., 2 for /{account}/{product}/...
bucket_separator: StringSeparator to join segments into an internal bucket name.
E.g., “–” produces account--product.
display_bucket_segments: usizeHow many leading segments form the “display bucket” name for XML responses.
E.g., 1 means <Name> shows just account.
Implementations§
Source§impl PathMapping
impl PathMapping
Sourcepub fn parse(&self, path: &str) -> Option<MappedPath>
pub fn parse(&self, path: &str) -> Option<MappedPath>
Parse a URL path into a MappedPath.
The path is expected to start with /. Segments are split on /,
and the first bucket_segments segments form the internal bucket name.
Any remaining content becomes the key.
Returns None if there are fewer than bucket_segments non-empty segments.
Sourcepub fn parse_bucket_name(&self, bucket_name: &str) -> Option<MappedPath>
pub fn parse_bucket_name(&self, bucket_name: &str) -> Option<MappedPath>
Parse a bucket name (e.g., “account–product”) back into a MappedPath.
Used by MappedRegistry when it receives an already-mapped bucket name.
Returns None if the bucket name does not split into exactly bucket_segments parts.
Trait Implementations§
Source§impl Clone for PathMapping
impl Clone for PathMapping
Source§fn clone(&self) -> PathMapping
fn clone(&self) -> PathMapping
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreAuto Trait Implementations§
impl Freeze for PathMapping
impl RefUnwindSafe for PathMapping
impl Send for PathMapping
impl Sync for PathMapping
impl Unpin for PathMapping
impl UnsafeUnpin for PathMapping
impl UnwindSafe for PathMapping
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
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>
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>
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