pub struct DatabasePath {
pub project: String,
pub instance: String,
pub database: String,
}Expand description
Parsed components of a Spanner database path
Fields§
§project: String§instance: String§database: StringImplementations§
Source§impl DatabasePath
impl DatabasePath
Sourcepub fn parse(path: &str) -> Result<Self, DbErr>
pub fn parse(path: &str) -> Result<Self, DbErr>
Parse a database path string into components
Expected format: projects/{project}/instances/{instance}/databases/{database}
Sourcepub fn project_path(&self) -> String
pub fn project_path(&self) -> String
Get the project path
Sourcepub fn instance_path(&self) -> String
pub fn instance_path(&self) -> String
Get the instance path
Trait Implementations§
Source§impl Clone for DatabasePath
impl Clone for DatabasePath
Source§fn clone(&self) -> DatabasePath
fn clone(&self) -> DatabasePath
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for DatabasePath
impl RefUnwindSafe for DatabasePath
impl Send for DatabasePath
impl Sync for DatabasePath
impl Unpin for DatabasePath
impl UnsafeUnpin for DatabasePath
impl UnwindSafe for DatabasePath
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
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 moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
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 moreSource§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T in a tonic::Request