version()
Returns the version of the server.
Method Syntaxdb.version()
use surrealdb::engine::any::connect; async fn main() -> surrealdb::Result<()> { let db = connect("ws://localhost:8000").await?; println!("{:?}", db.version().await?); Ok(()) }
The function resolves to a Version
struct as defined in the semver
crate. Output of the above example in October 2024:
Version { major: 2, minor: 0, patch: 3 }