Skip to main content

Snapshot

Struct Snapshot 

Source
pub struct Snapshot { /* private fields */ }

Implementations§

Source§

impl Snapshot

Source

pub const INITIAL_COMMIT_MESSAGE: &'static str = "Repository initialized"

Source

pub const INITIAL_SNAPSHOT_ID: SnapshotId

Source

pub fn from_buffer( spec_version: SpecVersionBin, buffer: Vec<u8>, ) -> IcechunkResult<Snapshot>

Source

pub fn bytes(&self) -> &[u8]

Source

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>

Source

pub fn initial(spec_version: SpecVersionBin) -> IcechunkResult<Self>

Source

pub fn id(&self) -> SnapshotId

Source

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

Source

pub fn metadata(&self) -> IcechunkResult<SnapshotProperties>

Source

pub fn flushed_at(&self) -> IcechunkResult<DateTime<Utc>>

Source

pub fn message(&self) -> String

Source

pub fn manifest_files( &self, ) -> impl Iterator<Item = IcechunkResult<ManifestFileInfo>> + '_

Source

pub 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

Cretase a new Snapshot with all the same data as new_child but self as parent

Source

pub fn get_node(&self, path: &Path) -> IcechunkResult<Arc<NodeSnapshot>>

Source

pub fn get_node_index(&self, path: &Path) -> IcechunkResult<usize>

Source

pub fn iter(&self) -> impl Iterator<Item = IcechunkResult<NodeSnapshot>> + '_

Source

pub fn iter_arc( self: Arc<Self>, parent_group: &Path, ) -> impl Iterator<Item = IcechunkResult<NodeSnapshot>> + use<>

Source

pub fn len(&self) -> usize

Source

pub fn is_empty(&self) -> bool

Source

pub fn manifest_info( &self, id: &ManifestId, ) -> IcechunkResult<Option<ManifestFileInfo>>

Trait Implementations§

Source§

impl Debug for Snapshot

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

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 more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

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
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more