pub struct HttpReadOnlyObjectStore { /* private fields */ }Expand description
Read-only ObjectStore backed by a public HTTPS origin.
Keys are appended to the origin as path segments: origin
https://cdn.yah.dev + key blobs/abc… → https://cdn.yah.dev/blobs/abc….
Implementations§
Trait Implementations§
Source§impl ObjectStore for HttpReadOnlyObjectStore
impl ObjectStore for HttpReadOnlyObjectStore
Source§fn get(&self, key: &str) -> Result<Option<Vec<u8>>, Error>
fn get(&self, key: &str) -> Result<Option<Vec<u8>>, Error>
Read bytes at
key. Returns None when the key does not exist —
NotFound is reserved for ambiguous cases (HEAD-then-GET race etc.).Source§fn head(&self, key: &str) -> Result<bool, Error>
fn head(&self, key: &str) -> Result<bool, Error>
Returns true when
key exists. Cheaper than get for backends that
support HEAD; the default impl falls back to get(...).is_some().Source§fn put(&self, _key: &str, _data: Vec<u8>) -> Result<(), Error>
fn put(&self, _key: &str, _data: Vec<u8>) -> Result<(), Error>
Write
data at key. Overwrites any existing object unconditionally.Source§fn delete(&self, _key: &str) -> Result<(), Error>
fn delete(&self, _key: &str) -> Result<(), Error>
Remove
key. Idempotent — succeeds whether or not the key existed.Source§fn list_prefix(&self, _prefix: &str) -> Result<Vec<String>, Error>
fn list_prefix(&self, _prefix: &str) -> Result<Vec<String>, Error>
List all keys with the given prefix (prefix-match, not glob).
Auto Trait Implementations§
impl !RefUnwindSafe for HttpReadOnlyObjectStore
impl !UnwindSafe for HttpReadOnlyObjectStore
impl Freeze for HttpReadOnlyObjectStore
impl Send for HttpReadOnlyObjectStore
impl Sync for HttpReadOnlyObjectStore
impl Unpin for HttpReadOnlyObjectStore
impl UnsafeUnpin for HttpReadOnlyObjectStore
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