pub struct QuoteIdent<'a>(pub &'a str);Expand description
A wrapper that returns the given string suitably quoted to be used as an identifier in an SQL
statement string in its Display implementation.
Quotes are added only if necessary (i.e., if the string contains non-identifier characters,
would be case-folded, or is a SQL keyword). Embedded quotes are properly doubled.
Tuple Fields§
§0: &'a strImplementations§
Source§impl QuoteIdent<'_>
impl QuoteIdent<'_>
pub(crate) fn needs_quotes(ident: &str) -> bool
Trait Implementations§
Auto Trait Implementations§
impl<'a> Freeze for QuoteIdent<'a>
impl<'a> RefUnwindSafe for QuoteIdent<'a>
impl<'a> Send for QuoteIdent<'a>
impl<'a> Sync for QuoteIdent<'a>
impl<'a> Unpin for QuoteIdent<'a>
impl<'a> UnwindSafe for QuoteIdent<'a>
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
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§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