pub enum OpenApiMode {
Disabled,
FollowPrivileges,
IgnorePrivileges,
}Expand description
OpenAPI generation mode.
PostgREST also has a security-definer mode, where the specification comes
from a user-supplied SECURITY DEFINER function. There is no configuration
here for naming that function, so the variant is absent rather than present
and behaving as one of the others.
Variants§
Disabled
No OpenAPI document is served.
FollowPrivileges
The document describes only what the requesting role may reach, so two roles asking are answered differently.
IgnorePrivileges
The document describes the whole exposed schema, whoever is asking.
Implementations§
Source§impl OpenApiMode
impl OpenApiMode
Sourcepub fn parse_config(s: &str) -> Option<Self>
pub fn parse_config(s: &str) -> Option<Self>
Parse the spelling used in configuration. Case-insensitive, and a hyphen or an underscore separates the words equally.
Sourcepub fn as_config_str(&self) -> &'static str
pub fn as_config_str(&self) -> &'static str
The inverse of parse_config.
Trait Implementations§
Source§impl Clone for OpenApiMode
impl Clone for OpenApiMode
Source§impl Debug for OpenApiMode
impl Debug for OpenApiMode
Source§impl<'de> Deserialize<'de> for OpenApiMode
impl<'de> Deserialize<'de> for OpenApiMode
Source§fn deserialize<D: Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error>
fn deserialize<D: Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error>
Deserialize this value from the given Serde deserializer. Read more
impl Eq for OpenApiMode
Source§impl PartialEq for OpenApiMode
impl PartialEq for OpenApiMode
Source§impl Serialize for OpenApiMode
impl Serialize for OpenApiMode
impl StructuralPartialEq for OpenApiMode
Auto Trait Implementations§
impl Freeze for OpenApiMode
impl RefUnwindSafe for OpenApiMode
impl Send for OpenApiMode
impl Sync for OpenApiMode
impl Unpin for OpenApiMode
impl UnsafeUnpin for OpenApiMode
impl UnwindSafe for OpenApiMode
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
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<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
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
Compare self to
key and return true if they are equal.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> ⓘ
Converts
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> ⓘ
Converts
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