#[non_exhaustive]pub struct Session {
pub name: String,
pub labels: HashMap<String, String>,
pub create_time: Option<Timestamp>,
pub approximate_last_use_time: Option<Timestamp>,
pub creator_role: String,
pub multiplexed: bool,
/* private fields */
}Expand description
A session in the Cloud Spanner API.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.name: StringOutput only. The name of the session. This is always system-assigned.
labels: HashMap<String, String>The labels for the session.
- Label keys must be between 1 and 63 characters long and must conform to
the following regular expression:
[a-z]([-a-z0-9]*[a-z0-9])?. - Label values must be between 0 and 63 characters long and must conform
to the regular expression
([a-z]([-a-z0-9]*[a-z0-9])?)?. - No more than 64 labels can be associated with a given session.
See https://goo.gl/xmQnxf for more information on and examples of labels.
create_time: Option<Timestamp>Output only. The timestamp when the session is created.
approximate_last_use_time: Option<Timestamp>Output only. The approximate timestamp when the session is last used. It’s typically earlier than the actual last use time.
creator_role: StringThe database role which created this session.
multiplexed: boolOptional. If true, specifies a multiplexed session. Use a multiplexed
session for multiple, concurrent operations including any combination of
read-only and read-write transactions. Use
sessions.create to create
multiplexed sessions. Don’t use
BatchCreateSessions to
create a multiplexed session. You can’t delete or list multiplexed
sessions.
Implementations§
Source§impl Session
impl Session
Sourcepub fn set_labels<T, K, V>(self, v: T) -> Self
pub fn set_labels<T, K, V>(self, v: T) -> Self
Sets the value of labels.
Sourcepub fn set_create_time<T>(self, v: T) -> Self
pub fn set_create_time<T>(self, v: T) -> Self
Sets the value of create_time.
Sourcepub fn set_or_clear_create_time<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_create_time<T>(self, v: Option<T>) -> Self
Sets or clears the value of create_time.
Sourcepub fn set_approximate_last_use_time<T>(self, v: T) -> Self
pub fn set_approximate_last_use_time<T>(self, v: T) -> Self
Sets the value of approximate_last_use_time.
Sourcepub fn set_or_clear_approximate_last_use_time<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_approximate_last_use_time<T>(self, v: Option<T>) -> Self
Sets or clears the value of approximate_last_use_time.
Sourcepub fn set_creator_role<T: Into<String>>(self, v: T) -> Self
pub fn set_creator_role<T: Into<String>>(self, v: T) -> Self
Sets the value of creator_role.
Sourcepub fn set_multiplexed<T: Into<bool>>(self, v: T) -> Self
pub fn set_multiplexed<T: Into<bool>>(self, v: T) -> Self
Sets the value of multiplexed.
Trait Implementations§
impl StructuralPartialEq for Session
Auto Trait Implementations§
impl Freeze for Session
impl RefUnwindSafe for Session
impl Send for Session
impl Sync for Session
impl Unpin for Session
impl UnsafeUnpin for Session
impl UnwindSafe for Session
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<T> FutureExt for T
impl<T> FutureExt for T
Source§fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_context(self, otel_cx: Context) -> WithContext<Self>
Source§fn with_current_context(self) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
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> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a tonic::Request