pub struct ConnectParams {
pub namespace: Option<String>,
pub database: Option<String>,
pub version_check: Option<bool>,
}Expand description
Parameters for connecting to SurrealDB
Fields§
§namespace: Option<String>Namespace to use
database: Option<String>Database to use
version_check: Option<bool>Whether to check SurrealDB version compatibility
Implementations§
Source§impl ConnectParams
impl ConnectParams
Sourcepub fn with_namespace(self, namespace: impl Into<String>) -> Self
pub fn with_namespace(self, namespace: impl Into<String>) -> Self
Set the namespace
Sourcepub fn with_database(self, database: impl Into<String>) -> Self
pub fn with_database(self, database: impl Into<String>) -> Self
Set the database
Sourcepub fn with_version_check(self, check: bool) -> Self
pub fn with_version_check(self, check: bool) -> Self
Enable or disable version checking
Trait Implementations§
Source§impl Clone for ConnectParams
impl Clone for ConnectParams
Source§fn clone(&self) -> ConnectParams
fn clone(&self) -> ConnectParams
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ConnectParams
impl Debug for ConnectParams
Source§impl Default for ConnectParams
impl Default for ConnectParams
Source§fn default() -> ConnectParams
fn default() -> ConnectParams
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for ConnectParams
impl<'de> Deserialize<'de> for ConnectParams
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for ConnectParams
impl RefUnwindSafe for ConnectParams
impl Send for ConnectParams
impl Sync for ConnectParams
impl Unpin for ConnectParams
impl UnsafeUnpin for ConnectParams
impl UnwindSafe for ConnectParams
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