# [−] [src] Enum utf8_ranges::Utf8Sequence

    pub enum Utf8Sequence {
        One(Utf8Range),
        Two([Utf8Range; 2]),
        Three([Utf8Range; 3]),
        Four([Utf8Range; 4]),
    }

Utf8Sequence represents a sequence of byte ranges.

To match a Utf8Sequence, a candidate byte sequence must match each successive range.

For example, if there are two ranges, `[C2-DF][80-BF]`, then the byte sequence `\xDD\x61` would not match because `0x61 < 0x80`.

## Variants

`One(Utf8Range)`

One byte range.

`Two([Utf8Range; 2])`

Two successive byte ranges.

`Three([Utf8Range; 3])`

Three successive byte ranges.

`Four([Utf8Range; 4])`

Four successive byte ranges.

## Methods

### `impl Utf8Sequence` [src]

#### `pub fn as_slice(&self) -> &[Utf8Range]` [src]

Returns the underlying sequence of byte ranges as a slice.

#### `pub fn len(&self) -> usize` [src]

Returns the number of byte ranges in this sequence.

The length is guaranteed to be in the closed interval `[1, 4]`.

#### `pub fn matches(&self, bytes: &[u8]) -> bool` [src]

Returns true if and only if a prefix of `bytes` matches this sequence of byte ranges.

## Trait Implementations

### `impl PartialEq<Utf8Sequence> for Utf8Sequence` [src]

#### `fn eq(&self, other: &Utf8Sequence) -> bool` [src]

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

#### `fn ne(&self, other: &Utf8Sequence) -> bool` [src]

This method tests for `!=`.

### `impl Clone for Utf8Sequence` [src]

#### `fn clone(&self) -> Utf8Sequence` [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<'a> IntoIterator for &'a Utf8Sequence` [src]

#### `type IntoIter = Iter<'a, Utf8Range>`

Which kind of iterator are we turning this into?

#### `type Item = &'a Utf8Range`

The type of the elements being iterated over.

#### `fn into_iter(self) -> Self::IntoIter` [src]

Creates an iterator from a value. Read more

### `impl Eq for Utf8Sequence` [src]

### `impl Copy for Utf8Sequence` [src]

### `impl Debug for Utf8Sequence` [src]

#### `fn fmt(&self, f: &mut Formatter) -> Result` [src]

Formats the value using the given formatter. Read more

## Auto Trait Implementations

### `impl Send for Utf8Sequence`

### `impl Sync for Utf8Sequence`

## Blanket Implementations

### `impl<T> From<T> for T` [src]

#### `fn from(t: T) -> T` [src]

Performs the conversion.

### `impl<T> ToOwned for T where
T: Clone,` [src]

#### `type Owned = T`

The resulting type after obtaining ownership.

#### `fn to_owned(&self) -> T` [src]

Creates owned data from borrowed data, usually by cloning. Read more

#### `fn clone_into(&self, target: &mut T)` [src]

🔬 This is a nightly-only experimental API. (`toowned_clone_into`)

recently added

Uses borrowed data to replace owned data, usually by cloning. Read more

### `impl<T, U> Into<U> for T where
U: From<T>,` [src]

#### `fn into(self) -> U` [src]

Performs the conversion.

### `impl<T, U> TryFrom<U> for T where
U: Into<T>,` [src]

#### `type Error = Infallible`

The type returned in the event of a conversion error.

#### `fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>` [src]

Performs the conversion.

### `impl<T, U> TryInto<U> for T where
U: TryFrom<T>,` [src]

#### `type Error = <U as TryFrom<T>>::Error`

The type returned in the event of a conversion error.

#### `fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>` [src]

Performs the conversion.

### `impl<T> BorrowMut<T> for T where
T: ?Sized,` [src]

#### `fn borrow_mut(&mut self) -> &mut T` [src]

Mutably borrows from an owned value. Read more

### `impl<T> Borrow<T> for T where
T: ?Sized,` [src]

#### `fn borrow(&self) -> &T` [src]

Immutably borrows from an owned value. Read more

### `impl<T> Any for T where
T: 'static + ?Sized,` [src]

#### `fn type_id(&self) -> TypeId` [src]

Gets the `TypeId` of `self`. Read more

# Help

## Keyboard Shortcuts

`?`
  Show this help dialog
`S`
  Focus the search field
`↑`
  Move up in search results
`↓`
  Move down in search results
`↹`
  Switch tab
`⏎`
  Go to active search result
`+`
  Expand all sections
`-`
  Collapse all sections

## Search Tricks

Prefix searches with a type followed by a colon (e.g., `fn:`) to restrict the search to a given type.

Accepted types are: `fn`, `mod`, `struct`, `enum`, `trait`, `type`, `macro`, and `const`.

Search functions by type signature (e.g., `vec -> usize` or `* -> vec`)

Search multiple things at once by splitting your query with comma (e.g., `str,u8` or `String,struct:Vec,test`)