pub struct Ident {
pub path: Vec<String>,
pub name: String,
}Expand description
A name. Generally columns, tables, functions, variables. This is glorified way of writing a “vec with at least one element”.
Fields§
§path: Vec<String>§name: StringImplementations§
source§impl Ident
impl Ident
pub fn from_name<S: ToString>(name: S) -> Self
pub fn from_path<S: ToString>(path: Vec<S>) -> Self
pub fn pop(self) -> Option<Self>
pub fn pop_front(self) -> (String, Option<Ident>)
pub fn with_name<S: ToString>(self, name: S) -> Self
pub fn iter(&self) -> impl Iterator<Item = &String>
pub fn starts_with(&self, prefix: &Ident) -> bool
Trait Implementations§
source§impl<'de> Deserialize<'de> for Ident
impl<'de> Deserialize<'de> for Ident
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 IntoIterator for Ident
impl IntoIterator for Ident
source§impl Ord for Ident
impl Ord for Ident
source§impl PartialEq<Ident> for Ident
impl PartialEq<Ident> for Ident
source§impl PartialOrd<Ident> for Ident
impl PartialOrd<Ident> for Ident
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self and other) and is used by the <=
operator. Read moreimpl Eq for Ident
impl StructuralEq for Ident
impl StructuralPartialEq for Ident
Auto Trait Implementations§
impl RefUnwindSafe for Ident
impl Send for Ident
impl Sync for Ident
impl Unpin for Ident
impl UnwindSafe for Ident
Blanket Implementations§
source§impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.