pub enum ReadOnlyMode {
Auto,
ReadOnly,
Writable,
}Expand description
How the API server decides whether to accept mutation requests.
Auto (the default) probes the Postgres connection — useful for running
the UI against a read replica or a read-only role without extra config.
Forcing ReadOnly is the operator escape hatch when the DB is writable
but mutations should still be disabled (e.g. an incident read-out, a
shared debugging instance, a less-trusted public UI session).
Variants§
Auto
Probe the DB connection — read-only if Postgres reports
transaction_read_only = on, writable otherwise.
ReadOnly
Force read-only regardless of DB privilege. Mutation endpoints return
503 (the same status the auto-detect path uses) and
/api/capabilities reports read_only: true.
Writable
Force writable. Mutations are always permitted at the HTTP layer; the DB still has the final say at query time.
Implementations§
Trait Implementations§
Source§impl Clone for ReadOnlyMode
impl Clone for ReadOnlyMode
Source§fn clone(&self) -> ReadOnlyMode
fn clone(&self) -> ReadOnlyMode
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreimpl Copy for ReadOnlyMode
Source§impl Debug for ReadOnlyMode
impl Debug for ReadOnlyMode
Source§impl Default for ReadOnlyMode
impl Default for ReadOnlyMode
Source§fn default() -> ReadOnlyMode
fn default() -> ReadOnlyMode
impl Eq for ReadOnlyMode
Source§impl PartialEq for ReadOnlyMode
impl PartialEq for ReadOnlyMode
impl StructuralPartialEq for ReadOnlyMode
Auto Trait Implementations§
impl Freeze for ReadOnlyMode
impl RefUnwindSafe for ReadOnlyMode
impl Send for ReadOnlyMode
impl Sync for ReadOnlyMode
impl Unpin for ReadOnlyMode
impl UnsafeUnpin for ReadOnlyMode
impl UnwindSafe for ReadOnlyMode
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
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>
impl<A, B, T> HttpServerConnExec<A, B> for Twhere
B: Body,
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>
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>
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 more