iceberg_catalog_rest

Struct RestCatalog

Source
pub struct RestCatalog { /* private fields */ }
Expand description

Rest catalog implementation.

Implementations§

Source§

impl RestCatalog

Source

pub fn new(config: RestCatalogConfig) -> Self

Creates a RestCatalog from a RestCatalogConfig.

Trait Implementations§

Source§

impl Catalog for RestCatalog

All requests and expected responses are derived from the REST catalog API spec: https://github.com/apache/iceberg/blob/main/open-api/rest-catalog-open-api.yaml

Source§

fn create_table<'life0, 'life1, 'async_trait>( &'life0 self, namespace: &'life1 NamespaceIdent, creation: TableCreation, ) -> Pin<Box<dyn Future<Output = Result<Table>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Create a new table inside the namespace.

In the resulting table, if there are any config properties that are present in both the response from the REST server and the config provided when creating this RestCatalog instance then the value provided locally to the RestCatalog will take precedence.

Source§

fn load_table<'life0, 'life1, 'async_trait>( &'life0 self, table_ident: &'life1 TableIdent, ) -> Pin<Box<dyn Future<Output = Result<Table>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Load table from the catalog.

If there are any config properties that are present in both the response from the REST server and the config provided when creating this RestCatalog instance, then the value provided locally to the RestCatalog will take precedence.

Source§

fn drop_table<'life0, 'life1, 'async_trait>( &'life0 self, table: &'life1 TableIdent, ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Drop a table from the catalog.

Source§

fn table_exists<'life0, 'life1, 'async_trait>( &'life0 self, table: &'life1 TableIdent, ) -> Pin<Box<dyn Future<Output = Result<bool>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Check if a table exists in the catalog.

Source§

fn rename_table<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, src: &'life1 TableIdent, dest: &'life2 TableIdent, ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Rename a table in the catalog.

Source§

fn list_namespaces<'life0, 'life1, 'async_trait>( &'life0 self, parent: Option<&'life1 NamespaceIdent>, ) -> Pin<Box<dyn Future<Output = Result<Vec<NamespaceIdent>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

List namespaces inside the catalog.
Source§

fn create_namespace<'life0, 'life1, 'async_trait>( &'life0 self, namespace: &'life1 NamespaceIdent, properties: HashMap<String, String>, ) -> Pin<Box<dyn Future<Output = Result<Namespace>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Create a new namespace inside the catalog.
Source§

fn get_namespace<'life0, 'life1, 'async_trait>( &'life0 self, namespace: &'life1 NamespaceIdent, ) -> Pin<Box<dyn Future<Output = Result<Namespace>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Get a namespace information from the catalog.
Source§

fn namespace_exists<'life0, 'life1, 'async_trait>( &'life0 self, ns: &'life1 NamespaceIdent, ) -> Pin<Box<dyn Future<Output = Result<bool>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Check if namespace exists in catalog.
Source§

fn update_namespace<'life0, 'life1, 'async_trait>( &'life0 self, _namespace: &'life1 NamespaceIdent, _properties: HashMap<String, String>, ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Update a namespace inside the catalog. Read more
Source§

fn drop_namespace<'life0, 'life1, 'async_trait>( &'life0 self, namespace: &'life1 NamespaceIdent, ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Drop a namespace from the catalog.
Source§

fn list_tables<'life0, 'life1, 'async_trait>( &'life0 self, namespace: &'life1 NamespaceIdent, ) -> Pin<Box<dyn Future<Output = Result<Vec<TableIdent>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

List tables from namespace.
Source§

fn update_table<'life0, 'async_trait>( &'life0 self, commit: TableCommit, ) -> Pin<Box<dyn Future<Output = Result<Table>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Update a table to the catalog.
Source§

impl Debug for RestCatalog

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.

§

impl<T> Instrument for T

§

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

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

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
§

impl<T> Pointable for T

§

const ALIGN: usize = _

The alignment of pointer.
§

type Init = T

The type for initializers.
§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
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.
§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

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
§

fn with_current_subscriber(self) -> WithDispatch<Self>

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

impl<T> ErasedDestructor for T
where T: 'static,

§

impl<T> MaybeSend for T
where T: Send,

§

impl<T> MaybeSendSync for T