Skip to main content

split_source_id

Function split_source_id 

Source
pub fn split_source_id(url: &str) -> (Option<&str>, Cow<'_, str>)
Expand description

The source an s3://<id>@bucket/key URL names, and the URL without it.

Only S3 URLs carry a source, and only for S3-compatible servers, whose bucket names repeat from one endpoint to the next. Bucket names cannot contain @, so an @ in the first segment is always a source. Everything else comes back unchanged.