pub struct Snapshot { /* private fields */ }Implementations§
Source§impl Snapshot
impl Snapshot
pub const INITIAL_COMMIT_MESSAGE: &'static str = "Repository initialized"
pub const INITIAL_SNAPSHOT_ID: SnapshotId
pub fn from_buffer( spec_version: SpecVersionBin, buffer: Vec<u8>, ) -> IcechunkResult<Snapshot>
pub fn bytes(&self) -> &[u8] ⓘ
pub fn from_iter<I>( id: Option<SnapshotId>, parent_id: Option<SnapshotId>, spec_version: SpecVersionBin, message: &str, properties: Option<SnapshotProperties>, manifest_files: Vec<ManifestFileInfo>, flushed_at: Option<DateTime<Utc>>, sorted_iter: I, ) -> IcechunkResult<Self>
pub fn initial(spec_version: SpecVersionBin) -> IcechunkResult<Self>
pub fn id(&self) -> SnapshotId
pub fn parent_id(&self) -> Option<SnapshotId>
👎Deprecated since 2.0.0:
New versions of icechunk don’t use this field and initialize it to None
pub fn metadata(&self) -> IcechunkResult<SnapshotProperties>
pub fn flushed_at(&self) -> IcechunkResult<DateTime<Utc>>
pub fn message(&self) -> String
pub fn manifest_files( &self, ) -> impl Iterator<Item = IcechunkResult<ManifestFileInfo>> + '_
Sourcepub fn adopt(&self, new_child: &Snapshot) -> IcechunkResult<Self>
👎Deprecated since 2.0.0: Shouldn’t be necessary after 2.0, only to support Icechunk 1 repos
pub fn adopt(&self, new_child: &Snapshot) -> IcechunkResult<Self>
Shouldn’t be necessary after 2.0, only to support Icechunk 1 repos
Cretase a new Snapshot with all the same data as new_child but self as parent
pub fn get_node(&self, path: &Path) -> IcechunkResult<Arc<NodeSnapshot>>
pub fn get_node_index(&self, path: &Path) -> IcechunkResult<usize>
pub fn iter(&self) -> impl Iterator<Item = IcechunkResult<NodeSnapshot>> + '_
pub fn iter_arc( self: Arc<Self>, parent_group: &Path, ) -> impl Iterator<Item = IcechunkResult<NodeSnapshot>> + use<>
pub fn len(&self) -> usize
pub fn is_empty(&self) -> bool
pub fn manifest_info( &self, id: &ManifestId, ) -> IcechunkResult<Option<ManifestFileInfo>>
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for Snapshot
impl !UnwindSafe for Snapshot
impl Freeze for Snapshot
impl Send for Snapshot
impl Sync for Snapshot
impl Unpin for Snapshot
impl UnsafeUnpin for Snapshot
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> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§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 more