Enum agnes::field::FieldIdent
[−]
[src]
pub enum FieldIdent { Index(usize), Name(String), }
Identifier for a field in the source.
Variants
Index(usize)
Unnamed field identifier, using the field index in the source file.
Name(String)
Field name in the source file
Methods
impl FieldIdent
[src]
pub fn to_string(&self) -> String
[src]
Produce a string representation of the field identifier. Either the name if
of the FieldIdent::Name
variant, or the string "Field #" if using the FieldIdent::Index
variant.
Trait Implementations
impl Debug for FieldIdent
[src]
fn fmt(&self, __arg_0: &mut Formatter) -> Result
[src]
Formats the value using the given formatter. Read more
impl Clone for FieldIdent
[src]
fn clone(&self) -> FieldIdent
[src]
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more
impl Display for FieldIdent
[src]
fn fmt(&self, f: &mut Formatter) -> Result<(), Error>
[src]
Formats the value using the given formatter. Read more
impl PartialEq for FieldIdent
[src]
fn eq(&self, other: &FieldIdent) -> bool
[src]
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, other: &Rhs) -> bool
1.0.0[src]
This method tests for !=
.
impl Eq for FieldIdent
[src]
impl Hash for FieldIdent
[src]
fn hash<H>(&self, state: &mut H) where
H: Hasher,
[src]
H: Hasher,
Feeds this value into the given [Hasher
]. Read more
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
1.3.0[src]
H: Hasher,
Feeds a slice of this type into the given [Hasher
]. Read more
impl From<usize> for FieldIdent
[src]
fn from(src: usize) -> FieldIdent
[src]
Performs the conversion.
impl<'a> From<&'a str> for FieldIdent
[src]
fn from(src: &'a str) -> FieldIdent
[src]
Performs the conversion.
impl From<String> for FieldIdent
[src]
fn from(src: String) -> FieldIdent
[src]
Performs the conversion.