pub struct Store<T> { /* private fields */ }Expand description
Versioned recording objects on a generic ObjectStore.
Implementations§
Source§impl<T: ObjectStore> Store<T>
impl<T: ObjectStore> Store<T>
Sourcepub fn new(inner: T, prefix: impl Into<Path>) -> Self
pub fn new(inner: T, prefix: impl Into<Path>) -> Self
Wrap inner with an application-defined recording prefix.
Sourcepub async fn put_info(&self, track: &str, info: &Info) -> Result<Key>
pub async fn put_info(&self, track: &str, info: &Info) -> Result<Key>
Create .info, or accept an existing object with the same parsed properties.
Sourcepub async fn put_groups(&self, track: &str, object: &Object) -> Result<Key>
pub async fn put_groups(&self, track: &str, object: &Object) -> Result<Key>
Create a range-named groups object. A collision is accepted only when the bytes match.
Sourcepub async fn get_groups(
&self,
track: &str,
range: RangeInclusive<u64>,
) -> Result<Object>
pub async fn get_groups( &self, track: &str, range: RangeInclusive<u64>, ) -> Result<Object>
Fetch a groups object and require its table to match the filename bounds.
Sourcepub async fn put_segments(
&self,
track: &str,
segment: u64,
object: &Object,
) -> Result<Key>
pub async fn put_segments( &self, track: &str, segment: u64, object: &Object, ) -> Result<Key>
Create a timeline object at segments/<segment>. A collision is accepted only when the bytes match.
Source§impl<T: ObjectStore + PaginatedListStore> Store<T>
impl<T: ObjectStore + PaginatedListStore> Store<T>
Sourcepub async fn list_paginated(&self, query: &Query) -> Result<Page>
pub async fn list_paginated(&self, query: &Query) -> Result<Page>
List one page while keeping the backend continuation token inside the returned query.
Trait Implementations§
Auto Trait Implementations§
impl<T> Freeze for Store<T>where
T: Freeze,
impl<T> RefUnwindSafe for Store<T>where
T: RefUnwindSafe,
impl<T> Send for Store<T>where
T: Send,
impl<T> Sync for Store<T>where
T: Sync,
impl<T> Unpin for Store<T>where
T: Unpin,
impl<T> UnsafeUnpin for Store<T>where
T: UnsafeUnpin,
impl<T> UnwindSafe for Store<T>where
T: 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