pub trait NeonControl: Send + Sync {
Show 14 methods
// Required methods
fn auth_status<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<String, NeonError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn branches<'life0, 'life1, 'async_trait>(
&'life0 self,
project: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Vec<Branch>, NeonError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn create_branch<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
project: &'life1 str,
spec: &'life2 CreateBranch,
) -> Pin<Box<dyn Future<Output = Result<Branch, NeonError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait;
fn delete_branch<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
project: &'life1 str,
id: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<(), NeonError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait;
fn reset_branch<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
project: &'life1 str,
id: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<(), NeonError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait;
fn connection<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
project: &'life1 str,
branch: &'life2 str,
database: Option<&'life3 str>,
pooled: bool,
) -> Pin<Box<dyn Future<Output = Result<Connection, NeonError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait;
fn databases<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
project: &'life1 str,
branch: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<Vec<String>, NeonError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait;
fn create_database<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
project: &'life1 str,
branch: &'life2 str,
name: &'life3 str,
) -> Pin<Box<dyn Future<Output = Result<(), NeonError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait;
fn functions<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
project: &'life1 str,
branch: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<Vec<Function>, NeonError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait;
fn storage<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
project: &'life1 str,
branch: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<Storage, NeonError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait;
fn buckets<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
project: &'life1 str,
branch: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<Vec<String>, NeonError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait;
fn create_bucket<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
project: &'life1 str,
branch: &'life2 str,
name: &'life3 str,
) -> Pin<Box<dyn Future<Output = Result<(), NeonError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait;
fn create_credential<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
project: &'life1 str,
branch: &'life2 str,
name: &'life3 str,
) -> Pin<Box<dyn Future<Output = Result<StorageCredential, NeonError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait;
fn revoke_credential<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
project: &'life1 str,
branch: &'life2 str,
token_id: &'life3 str,
) -> Pin<Box<dyn Future<Output = Result<(), NeonError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait;
}neon only.Expand description
What trestle asks of Neon, per project. NeonCli runs the Neon CLI; FakeNeon (feature
testing) is an in-memory stand-in.
Required Methods§
Sourcefn auth_status<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<String, NeonError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn auth_status<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<String, NeonError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Who the CLI is signed in as (an error when it isn’t).
Sourcefn branches<'life0, 'life1, 'async_trait>(
&'life0 self,
project: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Vec<Branch>, NeonError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn branches<'life0, 'life1, 'async_trait>(
&'life0 self,
project: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Vec<Branch>, NeonError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
The project’s branches, with their annotations.
Sourcefn create_branch<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
project: &'life1 str,
spec: &'life2 CreateBranch,
) -> Pin<Box<dyn Future<Output = Result<Branch, NeonError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn create_branch<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
project: &'life1 str,
spec: &'life2 CreateBranch,
) -> Pin<Box<dyn Future<Output = Result<Branch, NeonError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Create a branch (never printing its credentials).
Sourcefn delete_branch<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
project: &'life1 str,
id: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<(), NeonError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn delete_branch<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
project: &'life1 str,
id: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<(), NeonError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Delete the branch id.
Sourcefn reset_branch<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
project: &'life1 str,
id: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<(), NeonError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn reset_branch<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
project: &'life1 str,
id: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<(), NeonError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Reset the branch id to its parent’s current state.
Sourcefn connection<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
project: &'life1 str,
branch: &'life2 str,
database: Option<&'life3 str>,
pooled: bool,
) -> Pin<Box<dyn Future<Output = Result<Connection, NeonError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
fn connection<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
project: &'life1 str,
branch: &'life2 str,
database: Option<&'life3 str>,
pooled: bool,
) -> Pin<Box<dyn Future<Output = Result<Connection, NeonError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
The branch’s Postgres connection to database (the default one when None), through
the connection pooler when pooled.
Sourcefn databases<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
project: &'life1 str,
branch: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<Vec<String>, NeonError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn databases<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
project: &'life1 str,
branch: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<Vec<String>, NeonError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
The branch’s databases.
Sourcefn create_database<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
project: &'life1 str,
branch: &'life2 str,
name: &'life3 str,
) -> Pin<Box<dyn Future<Output = Result<(), NeonError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
fn create_database<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
project: &'life1 str,
branch: &'life2 str,
name: &'life3 str,
) -> Pin<Box<dyn Future<Output = Result<(), NeonError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
Create the database name on the branch.
Sourcefn functions<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
project: &'life1 str,
branch: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<Vec<Function>, NeonError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn functions<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
project: &'life1 str,
branch: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<Vec<Function>, NeonError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
The functions deployed on the branch.
Sourcefn storage<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
project: &'life1 str,
branch: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<Storage, NeonError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn storage<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
project: &'life1 str,
branch: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<Storage, NeonError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
The branch’s object storage.
Sourcefn buckets<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
project: &'life1 str,
branch: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<Vec<String>, NeonError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn buckets<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
project: &'life1 str,
branch: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<Vec<String>, NeonError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
The branch’s buckets.
Sourcefn create_bucket<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
project: &'life1 str,
branch: &'life2 str,
name: &'life3 str,
) -> Pin<Box<dyn Future<Output = Result<(), NeonError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
fn create_bucket<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
project: &'life1 str,
branch: &'life2 str,
name: &'life3 str,
) -> Pin<Box<dyn Future<Output = Result<(), NeonError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
Create the bucket name on the branch.
Sourcefn create_credential<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
project: &'life1 str,
branch: &'life2 str,
name: &'life3 str,
) -> Pin<Box<dyn Future<Output = Result<StorageCredential, NeonError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
fn create_credential<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
project: &'life1 str,
branch: &'life2 str,
name: &'life3 str,
) -> Pin<Box<dyn Future<Output = Result<StorageCredential, NeonError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
Mint a storage credential (read and write) called name on the branch.
Sourcefn revoke_credential<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
project: &'life1 str,
branch: &'life2 str,
token_id: &'life3 str,
) -> Pin<Box<dyn Future<Output = Result<(), NeonError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
fn revoke_credential<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
project: &'life1 str,
branch: &'life2 str,
token_id: &'life3 str,
) -> Pin<Box<dyn Future<Output = Result<(), NeonError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
Revoke the credential token_id on the branch.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".