pub struct RemoteSnapshot { /* private fields */ }
Implementations§
source§impl RemoteSnapshot
impl RemoteSnapshot
sourcepub fn get_for_local_snapshot(
snapshot: &Snapshot,
) -> Result<Option<Ref<RemoteSnapshot>>, ()>
pub fn get_for_local_snapshot( snapshot: &Snapshot, ) -> Result<Option<Ref<RemoteSnapshot>>, ()>
Get the remote snapshot associated with a local snapshot (if it exists)
sourcepub fn description(&self) -> BnString
pub fn description(&self) -> BnString
Get the description of a snapshot: the lines of its name after the first line
Get the user id of the author of a snapshot
Get the username of the author of a snapshot, if possible (vs author which is user id)
sourcepub fn created(&self) -> SystemTime
pub fn created(&self) -> SystemTime
Created date of Snapshot
sourcepub fn last_modified(&self) -> SystemTime
pub fn last_modified(&self) -> SystemTime
Date of last modification to the snapshot
sourcepub fn hash(&self) -> BnString
pub fn hash(&self) -> BnString
Hash of snapshot data (analysis and markup, etc) No specific hash algorithm is guaranteed
sourcepub fn snapshot_file_hash(&self) -> BnString
pub fn snapshot_file_hash(&self) -> BnString
Hash of file contents in snapshot No specific hash algorithm is guaranteed
sourcepub fn has_pulled_undo_entries(&self) -> bool
pub fn has_pulled_undo_entries(&self) -> bool
If the snapshot has pulled undo entries yet
sourcepub fn is_finalized(&self) -> bool
pub fn is_finalized(&self) -> bool
If the snapshot has been finalized on the server and is no longer editable
sourcepub fn parent_ids(&self) -> Result<Array<BnString>, ()>
pub fn parent_ids(&self) -> Result<Array<BnString>, ()>
List of ids of all remote parent Snapshots
sourcepub fn child_ids(&self) -> Result<Array<BnString>, ()>
pub fn child_ids(&self) -> Result<Array<BnString>, ()>
List of ids of all remote child Snapshots
sourcepub fn undo_entries(&self) -> Result<Array<RemoteUndoEntry>, ()>
pub fn undo_entries(&self) -> Result<Array<RemoteUndoEntry>, ()>
Get the list of undo entries stored in this snapshot.
NOTE: If undo entries have not been pulled, they will be pulled upon calling this.
sourcepub fn get_undo_entry_by_id(
&self,
id: RemoteUndoEntryId,
) -> Result<Option<Ref<RemoteUndoEntry>>, ()>
pub fn get_undo_entry_by_id( &self, id: RemoteUndoEntryId, ) -> Result<Option<Ref<RemoteUndoEntry>>, ()>
Get a specific Undo Entry in the Snapshot by its id
NOTE: If undo entries have not been pulled, they will be pulled upon calling this.
sourcepub fn pull_undo_entries(&self) -> Result<(), ()>
pub fn pull_undo_entries(&self) -> Result<(), ()>
Pull the list of Undo Entries from the Remote.
sourcepub fn pull_undo_entries_with_progress<P: ProgressCallback>(
&self,
progress: P,
) -> Result<(), ()>
pub fn pull_undo_entries_with_progress<P: ProgressCallback>( &self, progress: P, ) -> Result<(), ()>
Pull the list of Undo Entries from the Remote.
sourcepub fn create_undo_entry<S: BnStrCompatible>(
&self,
parent: Option<u64>,
data: S,
) -> Result<Ref<RemoteUndoEntry>, ()>
pub fn create_undo_entry<S: BnStrCompatible>( &self, parent: Option<u64>, data: S, ) -> Result<Ref<RemoteUndoEntry>, ()>
Create a new Undo Entry in this snapshot.
sourcepub fn finalize(&self) -> Result<(), ()>
pub fn finalize(&self) -> Result<(), ()>
Mark a snapshot as Finalized, committing it to the Remote, preventing future updates, and allowing snapshots to be children of it.
sourcepub fn get_local_snapshot(
&self,
bv: &BinaryView,
) -> Result<Option<Ref<Snapshot>>, ()>
pub fn get_local_snapshot( &self, bv: &BinaryView, ) -> Result<Option<Ref<Snapshot>>, ()>
Get the local snapshot associated with a remote snapshot (if it exists)