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) -> String
pub fn description(&self) -> String
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) -> String
pub fn hash(&self) -> String
Hash of snapshot data (analysis and markup, etc) No specific hash algorithm is guaranteed
Sourcepub fn snapshot_file_hash(&self) -> String
pub fn snapshot_file_hash(&self) -> String
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(
&self,
parent: Option<u64>,
data: &str,
) -> Result<Ref<RemoteUndoEntry>, ()>
pub fn create_undo_entry( &self, parent: Option<u64>, data: &str, ) -> 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)
pub fn analysis_cache_build_id(&self) -> u64
Trait Implementations§
Source§impl CoreArrayProvider for RemoteSnapshot
impl CoreArrayProvider for RemoteSnapshot
Source§impl PartialEq for RemoteSnapshot
impl PartialEq for RemoteSnapshot
Source§impl ToOwned for RemoteSnapshot
impl ToOwned for RemoteSnapshot
Source§type Owned = Ref<RemoteSnapshot>
type Owned = Ref<RemoteSnapshot>
Source§fn to_owned(&self) -> Self::Owned
fn to_owned(&self) -> Self::Owned
1.63.0 · Source§fn clone_into(&self, target: &mut Self::Owned)
fn clone_into(&self, target: &mut Self::Owned)
impl Eq for RemoteSnapshot
Auto Trait Implementations§
impl Freeze for RemoteSnapshot
impl RefUnwindSafe for RemoteSnapshot
impl !Send for RemoteSnapshot
impl !Sync for RemoteSnapshot
impl Unpin for RemoteSnapshot
impl UnwindSafe for RemoteSnapshot
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
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>
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>
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 more