pub struct Identifier(/* private fields */);Expand description
An identifier (column name, table name, alias) optimized for small strings.
Uses SmolStr internally which stores strings up to 22 bytes inline,
avoiding heap allocation for typical identifier names.
§Examples
use prax_query::builder::Identifier;
let id = Identifier::new("user_id");
assert_eq!(id.as_str(), "user_id");
// From static str (zero-copy)
let id: Identifier = "email".into();Implementations§
Source§impl Identifier
impl Identifier
Sourcepub const fn from_static(s: &'static str) -> Self
pub const fn from_static(s: &'static str) -> Self
Create from a static string (zero allocation).
Trait Implementations§
Source§impl AsRef<str> for Identifier
impl AsRef<str> for Identifier
Source§impl Clone for Identifier
impl Clone for Identifier
Source§fn clone(&self) -> Identifier
fn clone(&self) -> Identifier
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for Identifier
impl Debug for Identifier
Source§impl Default for Identifier
impl Default for Identifier
Source§impl Display for Identifier
impl Display for Identifier
Source§impl From<&String> for Identifier
impl From<&String> for Identifier
Source§impl From<&str> for Identifier
impl From<&str> for Identifier
Source§impl From<String> for Identifier
impl From<String> for Identifier
Source§impl Hash for Identifier
impl Hash for Identifier
Source§impl PartialEq for Identifier
impl PartialEq for Identifier
impl Eq for Identifier
impl StructuralPartialEq for Identifier
Auto Trait Implementations§
impl Freeze for Identifier
impl RefUnwindSafe for Identifier
impl Send for Identifier
impl Sync for Identifier
impl Unpin for Identifier
impl UnwindSafe for Identifier
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