pub struct Address { /* private fields */ }Available on crate feature
s3 only.Expand description
The address of a bucket repository: a bucket and a key prefix.
The form is s3://BUCKET[/PREFIX].
BUCKETis 3 to 63 characters: lowercase ASCII letters, digits,., and-. It starts and ends with a letter or a digit. It holds no.., and it is not four decimal numbers that.separates, as an IPv4 address is.PREFIXis one or more segments that/separates. Each segment is not empty, is not.or.., and holds the charactersA-Z,a-z,0-9,-,.,_, and~alone. One trailing/is dropped.- The address holds no userinfo, no port, no query, and no fragment.
The keys of the repository start with PREFIX/. With no prefix, they
start at the root of the bucket and have no leading /.
The Display output is the canonical form, with no
trailing /.
§Examples
use ostrya_remote::s3::Address;
let address = Address::parse("s3://builds/exampleos/")?;
assert_eq!(address.bucket(), "builds");
assert_eq!(address.prefix(), "exampleos");
assert_eq!(address.to_string(), "s3://builds/exampleos");
assert!(Address::parse("s3://Builds").is_err());Implementations§
Trait Implementations§
impl Eq for Address
impl StructuralPartialEq for Address
Auto Trait Implementations§
impl Forget for Address
impl Freeze for Address
impl Move for Address
impl RefUnwindSafe for Address
impl Send for Addresswhere
RawVecInner: Send,
impl Sync for Addresswhere
RawVecInner: Sync,
impl Unpin for Address
impl UnsafeUnpin for Address
impl UnwindSafe for Addresswhere
RawVecInner: UnwindSafe,
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
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.