pub struct Attribute(/* private fields */);
Expand description
An attribute name or identifier, like :db/id
or :pet/name
.
Implementations§
Source§impl Attribute
impl Attribute
Sourcepub fn from_ident(ident: &str) -> Self
pub fn from_ident(ident: &str) -> Self
Copies the given identifier and prepends a :
to create an Attribute.
pub fn from_string_unchecked(s: String) -> Self
Sourcepub fn from_static(s: &'static str) -> Self
pub fn from_static(s: &'static str) -> Self
Panics if the attribute is invalid.
Methods from Deref<Target = AttributeRef>§
Trait Implementations§
Source§impl AsRef<AttributeRef> for Attribute
impl AsRef<AttributeRef> for Attribute
Source§fn as_ref(&self) -> &AttributeRef
fn as_ref(&self) -> &AttributeRef
Converts this type into a shared reference of the (usually inferred) input type.
Source§impl Borrow<AttributeRef> for Attribute
impl Borrow<AttributeRef> for Attribute
Source§fn borrow(&self) -> &AttributeRef
fn borrow(&self) -> &AttributeRef
Immutably borrows from an owned value. Read more
Source§impl<'de> Deserialize<'de> for Attribute
impl<'de> Deserialize<'de> for Attribute
Source§fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where
D: Deserializer<'de>,
fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where
D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl<'a> FromSql for Attribute
impl<'a> FromSql for Attribute
Source§fn column_result(value: SqlValueRef<'_>) -> FromSqlResult<Self>
fn column_result(value: SqlValueRef<'_>) -> FromSqlResult<Self>
Converts SQLite value into Rust value.
Source§impl FromTypeTagAndSqlValue for Attribute
impl FromTypeTagAndSqlValue for Attribute
fn from_type_tag_and_sql_value( type_tag: i64, value: SqlValueRef<'_>, ) -> FromSqlResult<Self>
Source§impl Ord for Attribute
impl Ord for Attribute
Source§impl PartialOrd for Attribute
impl PartialOrd for Attribute
Source§impl ToSql for Attribute
impl ToSql for Attribute
Source§fn to_sql(&self) -> Result<ToSqlOutput<'_>>
fn to_sql(&self) -> Result<ToSqlOutput<'_>>
Converts Rust value to SQLite value
impl Eq for Attribute
impl StructuralPartialEq for Attribute
Auto Trait Implementations§
impl Freeze for Attribute
impl RefUnwindSafe for Attribute
impl Send for Attribute
impl Sync for Attribute
impl Unpin for Attribute
impl UnwindSafe for Attribute
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