• Start

Languages

/

Rust

/

Methods

health

The .health() method for the SurrealDB Rust SDK checks that the server-side connection is able to run a health command (useful for readiness and liveness checks).

Runs a lightweight health check on the current session/connection. On success, the future resolves to Ok(()); otherwise you get a surrealdb::Error.

Method Syntax

db.health().await?

This is a simple way to assert the database is reachable and accepting commands after connect (or periodically in long-lived processes) without sending a full SurrealQL query.

Was this page helpful?