Struct anitomy::Elements[][src]

pub struct Elements { /* fields omitted */ }

Collection of Element instances parsed from a filename, as a result of calling Anitomy.parse.

Methods

impl Elements
[src]

Determines whether there are no elements of a given category.

Passing None will check for any elements at all.

Counts the number of elements of a given category.

Passing None will count all elements.

Gets the first element of a category if one exists.

Important traits for Vec<u8>

Gets all elements of a category.

Methods from Deref<Target = Vec<Element>>

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 [u8]

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();

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);

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 Elements
[src]

Formats the value using the given formatter. Read more

impl Clone for Elements
[src]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

impl PartialEq for Elements
[src]

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

This method tests for !=.

impl Eq for Elements
[src]

impl Deref for Elements
[src]

The resulting type after dereferencing.

Dereferences the value.

Auto Trait Implementations

impl Send for Elements

impl Sync for Elements