pub struct Text;
Expand description
The text SQL type.
On all backends strings must be valid UTF-8. On PostgreSQL strings must not include nul bytes.
Schema inference will treat all variants of TEXT
as this type (e.g.
VARCHAR
, MEDIUMTEXT
, etc).
ToSql
impls
FromSql
impls
Trait Implementations
sourceimpl<'expr> AsExpression<Text> for &'expr String
impl<'expr> AsExpression<Text> for &'expr String
type Expression = Bound<Text, Self>
type Expression = Bound<Text, Self>
The expression being returned
sourcefn as_expression(self) -> Self::Expression
fn as_expression(self) -> Self::Expression
Perform the conversion
sourceimpl<'expr2, 'expr> AsExpression<Text> for &'expr2 &'expr String
impl<'expr2, 'expr> AsExpression<Text> for &'expr2 &'expr String
type Expression = Bound<Text, Self>
type Expression = Bound<Text, Self>
The expression being returned
sourcefn as_expression(self) -> Self::Expression
fn as_expression(self) -> Self::Expression
Perform the conversion
sourceimpl AsExpression<Text> for String
impl AsExpression<Text> for String
type Expression = Bound<Text, Self>
type Expression = Bound<Text, Self>
The expression being returned
sourcefn as_expression(self) -> Self::Expression
fn as_expression(self) -> Self::Expression
Perform the conversion
sourceimpl<'expr> AsExpression<Text> for &'expr str
impl<'expr> AsExpression<Text> for &'expr str
type Expression = Bound<Text, Self>
type Expression = Bound<Text, Self>
The expression being returned
sourcefn as_expression(self) -> Self::Expression
fn as_expression(self) -> Self::Expression
Perform the conversion
sourceimpl<'expr2, 'expr> AsExpression<Text> for &'expr2 &'expr str
impl<'expr2, 'expr> AsExpression<Text> for &'expr2 &'expr str
type Expression = Bound<Text, Self>
type Expression = Bound<Text, Self>
The expression being returned
sourcefn as_expression(self) -> Self::Expression
fn as_expression(self) -> Self::Expression
Perform the conversion
sourceimpl<DB: Backend<RawValue = [u8]>> FromSql<Text, DB> for *const str
impl<DB: Backend<RawValue = [u8]>> FromSql<Text, DB> for *const str
The returned pointer is only valid for the lifetime to the argument of
from_sql
. This impl is intended for uses where you want to write a new
impl in terms of String
, but don’t want to allocate. We have to return a
raw pointer instead of a reference with a lifetime due to the structure of
FromSql
sourceimpl QueryId for Text
impl QueryId for Text
sourceconst HAS_STATIC_QUERY_ID: bool
const HAS_STATIC_QUERY_ID: bool
Can the SQL generated by Self
be uniquely identified by its type? Read more
impl Copy for Text
impl NotNull for Text
impl SingleValue for Text
impl SqlOrd for Text
Auto Trait Implementations
impl RefUnwindSafe for Text
impl Send for Text
impl Sync for Text
impl Unpin for Text
impl UnwindSafe for Text
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcepub fn borrow_mut(&mut self) -> &mut T
pub fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> IntoNullable for T where
T: NotNull,
impl<T> IntoNullable for T where
T: NotNull,
sourceimpl<T> IntoSql for T
impl<T> IntoSql for T
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcepub fn to_owned(&self) -> T
pub fn to_owned(&self) -> T
Creates owned data from borrowed data, usually by cloning. Read more
sourcepub fn clone_into(&self, target: &mut T)
pub fn clone_into(&self, target: &mut T)
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more