pub trait SpannerResource {
    fn name(&self) -> &str;
    fn resources_path(&self) -> String;

    fn id(&self) -> String { ... }
}
Expand description

A trait for identifiable resources within Cloud Spanner.

The format is typically something like <kind>/<name> where kind is the plural form of the resource kind, e.g.: projects or databases and name is the name of a particular instance of that resource.

For example, the database resource named my-database in the my-instance instance in the my-gcp-project project will have the following identifier: projects/my-gcp-project/instances/my-instance/databases/my-database.

Required Methods

The name of this particular instance of the resource.

The full path to all resources under the same parent.

For example, for the InstanceId resource, this would return something like projects/my-project/instances

Provided Methods

The full path to this particular resource.

For example, projects/my-project/instances/my-instance

Implementors