pub enum ValueRef<'a> {
Entity(Entity),
Attribute(&'a AttributeRef),
Text(&'a str),
Integer(i64),
Float(f64),
Boolean(bool),
Uuid(Uuid),
Blob(&'a [u8]),
}
Expand description
A borrowing version of Value
Variants
Entity(Entity)
Attribute(&'a AttributeRef)
Text(&'a str)
Integer(i64)
Float(f64)
Boolean(bool)
Uuid(Uuid)
Blob(&'a [u8])
Trait Implementations
sourceimpl<'v> Display for ValueRef<'v>
impl<'v> Display for ValueRef<'v>
Opposite of FromStr
and FromBorrowedStr
. Requires the serde_json
feature.
Formatting rules are something like:
- #entity-id
- :some/attribute
- “text is a json string”
- some-hyphenated-uuid
sourceimpl<'a> From<&'a AttributeRef> for ValueRef<'a>
impl<'a> From<&'a AttributeRef> for ValueRef<'a>
sourcefn from(v: &'a AttributeRef) -> Self
fn from(v: &'a AttributeRef) -> Self
Performs the conversion.
sourceimpl<'a> FromBorrowedStr<'a> for ValueRef<'a>
impl<'a> FromBorrowedStr<'a> for ValueRef<'a>
Opposite of fmt::Display
. Requires the serde_json
feature.
sourceimpl ToSql for ValueRef<'_>
impl ToSql for ValueRef<'_>
sourcefn to_sql(&self) -> Result<ToSqlOutput<'_>>
fn to_sql(&self) -> Result<ToSqlOutput<'_>>
Converts Rust value to SQLite value
impl<'a> Copy for ValueRef<'a>
impl<'a> StructuralPartialEq for ValueRef<'a>
Auto Trait Implementations
impl<'a> RefUnwindSafe for ValueRef<'a>
impl<'a> Send for ValueRef<'a>
impl<'a> Sync for ValueRef<'a>
impl<'a> Unpin for ValueRef<'a>
impl<'a> UnwindSafe for ValueRef<'a>
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> 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)
🔬 This is a nightly-only experimental API. (
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more