#[non_exhaustive]pub enum SafetyConstraint {
ParameterizedValues,
CheckedIdentifiers,
ExplicitTrustedExpressions,
WriteRequiresWhere,
StructuredCommandArguments,
}Expand description
后端公开 API 必须遵守的安全约束。
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
ParameterizedValues
数据值使用驱动绑定参数,不拼接为 SQL/命令文本。
CheckedIdentifiers
外部标识符通过 checked identifier API 进入。
ExplicitTrustedExpressions
可信 SQL 表达式入口与标识符入口在 API 上显式分离。
WriteRequiresWhere
UPDATE/DELETE 缺少 WHERE 时 fail-closed。
StructuredCommandArguments
Redis 命令和值通过结构化参数传给驱动。
Trait Implementations§
Source§impl Clone for SafetyConstraint
impl Clone for SafetyConstraint
impl Copy for SafetyConstraint
Source§impl Debug for SafetyConstraint
impl Debug for SafetyConstraint
impl Eq for SafetyConstraint
Source§impl Hash for SafetyConstraint
impl Hash for SafetyConstraint
Source§impl PartialEq for SafetyConstraint
impl PartialEq for SafetyConstraint
impl StructuralPartialEq for SafetyConstraint
Auto Trait Implementations§
impl Forget for SafetyConstraint
impl Freeze for SafetyConstraint
impl Move for SafetyConstraint
impl RefUnwindSafe for SafetyConstraint
impl Send for SafetyConstraint
impl Sync for SafetyConstraint
impl Unpin for SafetyConstraint
impl UnsafeUnpin for SafetyConstraint
impl UnwindSafe for SafetyConstraint
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,
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