Trait parse_mediawiki_sql::from_sql::FromSql [−][src]
Expand description
Trait for converting from the SQL syntax for a simple type
(anything other than a tuple) to a Rust type,
which can borrow from the string or not.
Used by schemas::FromSqlTuple
.
Required methods
Implementations on Foreign Types
impl<'a> FromSql<'a> for f32
[src]
impl<'a> FromSql<'a> for f32
[src]Matches a float literal with recognize_float
and parses it as a f32
.
impl<'a> FromSql<'a> for f64
[src]
impl<'a> FromSql<'a> for f64
[src]Matches a float literal with recognize_float
and parses it as a f64
.
impl<'a> FromSql<'a> for &'a str
[src]
impl<'a> FromSql<'a> for &'a str
[src]Used for types represented as strings without escape sequences. For instance,
Timestamp
s matches the regex ^[0-9: -]+$
and thus never has any escape sequences.
impl<'a> FromSql<'a> for String
[src]
impl<'a> FromSql<'a> for String
[src]Use this for string types that require unescaping and are guaranteed to be valid UTF-8, like page titles.
impl<'a> FromSql<'a> for Vec<u8>
[src]
impl<'a> FromSql<'a> for Vec<u8>
[src]Used for “strings” that sometimes contain invalid UTF-8, like the
cl_sortkey
field in the categorylinks
table, which is truncated to 230
bits, sometimes in the middle of a UTF-8 sequence.
Implementors
impl<'a> FromSql<'a> for NotNan<f32>
[src]
impl<'a> FromSql<'a> for NotNan<f32>
[src]Parses an f32
and wraps it with NotNan::unchecked_new
.
Safety
This will never accidentally wrap a NaN
because nom
’s recognize_float
doesn’t include a representation of NaN
.
impl<'a> FromSql<'a> for NotNan<f64>
[src]
impl<'a> FromSql<'a> for NotNan<f64>
[src]Parses an f64
and wraps it with NotNan::unchecked_new
.
Safety
This will never accidentally wrap a NaN
because nom
’s recognize_float
doesn’t include a representation of NaN
.
impl<'a> FromSql<'a> for PageRestrictionsOld<'a>
[src]
impl<'a> FromSql<'a> for PageRestrictionsOld<'a>
[src]impl<'input> FromSql<'input> for CategoryId
[src]
impl<'input> FromSql<'input> for CategoryId
[src]impl<'input> FromSql<'input> for ChangeTagDefinitionId
[src]
impl<'input> FromSql<'input> for ChangeTagDefinitionId
[src]impl<'input> FromSql<'input> for ChangeTagId
[src]
impl<'input> FromSql<'input> for ChangeTagId
[src]impl<'input> FromSql<'input> for ExternalLinkId
[src]
impl<'input> FromSql<'input> for ExternalLinkId
[src]impl<'input> FromSql<'input> for FullPageTitle
[src]
impl<'input> FromSql<'input> for FullPageTitle
[src]impl<'input> FromSql<'input> for PageNamespace
[src]
impl<'input> FromSql<'input> for PageNamespace
[src]impl<'input> FromSql<'input> for PageRestrictionId
[src]
impl<'input> FromSql<'input> for PageRestrictionId
[src]impl<'input> FromSql<'input> for RecentChangeId
[src]
impl<'input> FromSql<'input> for RecentChangeId
[src]impl<'input> FromSql<'input> for RevisionId
[src]
impl<'input> FromSql<'input> for RevisionId
[src]