Struct darling_core::util::IdentList [] [src]

pub struct IdentList(_);

A list of syn::Ident instances. This type is used to extract a list of words from an attribute.

Usage

An IdentList field on a struct implementing FromMeta will turn #[builder(derive(Debug, Clone))] into:

This example is not tested
StructOptions {
    derive: IdentList(vec![syn::Ident::new("Debug"), syn::Ident::new("Clone")])
}

Methods

impl IdentList
[src]

[src]

Create a new list.

Important traits for Vec<u8>
[src]

Creates a view of the contained identifiers as &strs.

Methods from Deref<Target = Vec<Ident>>

1.0.0
[src]

Returns the number of elements the vector can hold without reallocating.

Examples

let vec: Vec<i32> = Vec::with_capacity(10);
assert_eq!(vec.capacity(), 10);

Important traits for &'a mut [u8]
1.7.0
[src]

Extracts a slice containing the entire vector.

Equivalent to &s[..].

Examples

use std::io::{self, Write};
let buffer = vec![1, 2, 3, 5, 8];
io::sink().write(buffer.as_slice()).unwrap();

1.0.0
[src]

Returns the number of elements in the vector, also referred to as its 'length'.

Examples

let a = vec![1, 2, 3];
assert_eq!(a.len(), 3);

1.0.0
[src]

Returns true if the vector contains no elements.

Examples

let mut v = Vec::new();
assert!(v.is_empty());

v.push(1);
assert!(!v.is_empty());

Trait Implementations

impl Debug for IdentList
[src]

[src]

Formats the value using the given formatter. Read more

impl Default for IdentList
[src]

[src]

Returns the "default value" for a type. Read more

impl Clone for IdentList
[src]

[src]

Returns a copy of the value. Read more

1.0.0
[src]

Performs copy-assignment from source. Read more

impl PartialEq for IdentList
[src]

[src]

This method tests for self and other values to be equal, and is used by ==. Read more

[src]

This method tests for !=.

impl Eq for IdentList
[src]

impl Deref for IdentList
[src]

The resulting type after dereferencing.

[src]

Dereferences the value.

impl From<Vec<Ident>> for IdentList
[src]

[src]

Performs the conversion.

impl FromMeta for IdentList
[src]

[src]

Create an instance from a list of nested meta items.

[src]

[src]

Create an instance from a syn::Meta by dispatching to the format-appropriate trait function. This generally should not be overridden by implementers. Read more

[src]

Create an instance from the presence of the word in the attribute with no additional options specified. Read more

[src]

Create an instance from a literal value of either foo = "bar" or foo("bar"). This dispatches to the appropriate method based on the type of literal encountered, and generally should not be overridden by implementers. Read more

[src]

Create an instance from a char literal in a value position.

[src]

Create an instance from a string literal in a value position.

[src]

Create an instance from a bool literal in a value position.

Auto Trait Implementations

impl !Send for IdentList

impl !Sync for IdentList