pub trait FunctionHandler<Cx = RequestContext>:
Send
+ Sync
+ 'static {
// Required methods
fn list_functions<'life0, 'async_trait>(
&'life0 self,
request: ListFunctionsRequest,
context: Cx,
) -> Pin<Box<dyn Future<Output = Result<ListFunctionsResponse>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn create_function<'life0, 'async_trait>(
&'life0 self,
request: CreateFunctionRequest,
context: Cx,
) -> Pin<Box<dyn Future<Output = Result<Function>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn get_function<'life0, 'async_trait>(
&'life0 self,
request: GetFunctionRequest,
context: Cx,
) -> Pin<Box<dyn Future<Output = Result<Function>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn update_function<'life0, 'async_trait>(
&'life0 self,
request: UpdateFunctionRequest,
context: Cx,
) -> Pin<Box<dyn Future<Output = Result<Function>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn delete_function<'life0, 'async_trait>(
&'life0 self,
request: DeleteFunctionRequest,
context: Cx,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
}Required Methods§
Sourcefn list_functions<'life0, 'async_trait>(
&'life0 self,
request: ListFunctionsRequest,
context: Cx,
) -> Pin<Box<dyn Future<Output = Result<ListFunctionsResponse>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn list_functions<'life0, 'async_trait>(
&'life0 self,
request: ListFunctionsRequest,
context: Cx,
) -> Pin<Box<dyn Future<Output = Result<ListFunctionsResponse>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
List functions
List functions within the specified parent catalog and schema. If the caller is the metastore admin, all functions are returned in the response. Otherwise, the caller must have USE_CATALOG on the parent catalog and USE_SCHEMA on the parent schema, and the function must either be owned by the caller or have SELECT on the function.
Sourcefn create_function<'life0, 'async_trait>(
&'life0 self,
request: CreateFunctionRequest,
context: Cx,
) -> Pin<Box<dyn Future<Output = Result<Function>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn create_function<'life0, 'async_trait>(
&'life0 self,
request: CreateFunctionRequest,
context: Cx,
) -> Pin<Box<dyn Future<Output = Result<Function>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Create a function
Creates a new function. The caller must be a metastore admin or have the CREATE_FUNCTION privilege on the parent catalog and schema.
Sourcefn get_function<'life0, 'async_trait>(
&'life0 self,
request: GetFunctionRequest,
context: Cx,
) -> Pin<Box<dyn Future<Output = Result<Function>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get_function<'life0, 'async_trait>(
&'life0 self,
request: GetFunctionRequest,
context: Cx,
) -> Pin<Box<dyn Future<Output = Result<Function>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Get a function
Gets a function from within a parent catalog and schema. For the fetch to succeed, the caller must be a metastore admin, the owner of the function, or have SELECT on the function.
Sourcefn update_function<'life0, 'async_trait>(
&'life0 self,
request: UpdateFunctionRequest,
context: Cx,
) -> Pin<Box<dyn Future<Output = Result<Function>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn update_function<'life0, 'async_trait>(
&'life0 self,
request: UpdateFunctionRequest,
context: Cx,
) -> Pin<Box<dyn Future<Output = Result<Function>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Update a function
Updates the function that matches the supplied name. Only the owner of the function can be updated.
Sourcefn delete_function<'life0, 'async_trait>(
&'life0 self,
request: DeleteFunctionRequest,
context: Cx,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn delete_function<'life0, 'async_trait>(
&'life0 self,
request: DeleteFunctionRequest,
context: Cx,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Delete a function
Deletes the function that matches the supplied name. For the deletion to succeed, the caller must be the owner of the function.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".