pub struct TestOwnerGraph { /* private fields */ }Implementations§
Source§impl TestOwnerGraph
impl TestOwnerGraph
pub fn new(database: StoreDatabase, store_dir: StoreDir) -> Self
Sourcepub async fn seed_local_release(
&self,
user_dir: &Path,
note_id: &str,
photo_id: &str,
cloud_path: &str,
bytes: &[u8],
) -> PathBuf
pub async fn seed_local_release( &self, user_dir: &Path, note_id: &str, photo_id: &str, cloud_path: &str, bytes: &[u8], ) -> PathBuf
Insert a Local release: a gated-off note plus a blob-bearing photo with an external source file registered for it. Returns the external source path.
Sourcepub async fn seed_remote_release(
&self,
store: &TestStore,
routing_encryption: Option<&EncryptionService>,
note_id: &str,
photo_id: &str,
cloud_path: &str,
bytes: &[u8],
)
pub async fn seed_remote_release( &self, store: &TestStore, routing_encryption: Option<&EncryptionService>, note_id: &str, photo_id: &str, cloud_path: &str, bytes: &[u8], )
Insert a Remote release: a gated-on note plus a photo whose blob is already in cloud storage at the readable path the plaintext scheme derives.
pub async fn stage_pending_upload_for_test( &self, source_dir: &Path, blob_id: &str, bytes: &[u8], created_at: &str, )
pub async fn drain_published_blob_drop_intents( &self, through_sequence: u64, ) -> Result<(), TestError>
pub async fn make_remote( &self, root_table: &str, root_id: &str, root_label: &str, pin: bool, ) -> Result<(), MakeRemoteError>
pub async fn make_local( &self, storage: Arc<dyn CloudSyncObjectStorage>, routing_encryption: Option<EncryptionService>, observer: Option<Arc<dyn BlobTransitionObserver>>, root_table: &str, root_id: &str, dest: &HashMap<String, PathBuf>, cancel: &Receiver<bool>, ) -> Result<(), MakeLocalError>
Sourcepub async fn fill_eager_cache(
&self,
storage: Arc<dyn CloudSyncObjectStorage>,
) -> Result<(), Arc<EagerCacheFillError>>
pub async fn fill_eager_cache( &self, storage: Arc<dyn CloudSyncObjectStorage>, ) -> Result<(), Arc<EagerCacheFillError>>
Run the eager cache fill the sync loop runs behind its cycles, which is what makes an eager blob local now that a pull downloads nothing.
pub async fn read_blob( &self, storage: Option<Arc<dyn CloudSyncObjectStorage>>, reference: &RowBlobRef, ) -> Result<Vec<u8>, BlobCacheError>
pub async fn open_blob_stream( &self, storage: Option<Arc<dyn CloudSyncObjectStorage>>, reference: &RowBlobRef, ) -> Result<BlobStream, BlobCacheError>
pub async fn read_blob_range( &self, storage: Option<Arc<dyn CloudSyncObjectStorage>>, reference: &RowBlobRef, offset: u64, len: u64, ) -> Result<Vec<u8>, BlobCacheError>
pub async fn materialize_blob( &self, storage: Option<Arc<dyn CloudSyncObjectStorage>>, reference: &RowBlobRef, ) -> Result<(), BlobCacheError>
pub async fn pin_blobs( &self, storage: Option<Arc<dyn CloudSyncObjectStorage>>, references: &[RowBlobRef], ) -> Result<(), BlobCacheError>
pub async fn run_sync_cycle( &self, storage: impl Into<Arc<CloudSyncConnection>>, identity: UserKeypair, ) -> Result<SyncCycleResult, TestError>
Trait Implementations§
Source§impl Clone for TestOwnerGraph
impl Clone for TestOwnerGraph
Source§fn clone(&self) -> TestOwnerGraph
fn clone(&self) -> TestOwnerGraph
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for TestOwnerGraph
impl !RefUnwindSafe for TestOwnerGraph
impl Send for TestOwnerGraph
impl Sync for TestOwnerGraph
impl Unpin for TestOwnerGraph
impl UnsafeUnpin for TestOwnerGraph
impl !UnwindSafe for TestOwnerGraph
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,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§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>
Converts
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>
Converts
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 moreCreates a shared type from an unshared type.