Docs.rs
  • generic-arrayvec-0.0.2
    • generic-arrayvec 0.0.2
    • Docs.rs crate page
    • MIT OR Apache-2.0
    • Links
    • Repository
    • crates.io
    • Source
    • Owners
    • Seeker14491
    • Dependencies
      • arrayvec ^0.4.7
      • generic-array ^0.11.1
    • Versions
  • Go to latest version
  • Platform
    • i686-apple-darwin
    • i686-pc-windows-msvc
    • i686-unknown-linux-gnu
    • x86_64-apple-darwin
    • x86_64-pc-windows-msvc
    • x86_64-unknown-linux-gnu
  • Feature flags
  • docs.rs
    • About docs.rs
    • Badges
    • Builds
    • Metadata
    • Shorthand URLs
    • Download
    • Rustdoc JSON
    • Build queue
    • Privacy policy
  • Rust
    • Rust website
    • The Book
    • Standard Library API Reference
    • Rust by Example
    • The Cargo Guide
    • Clippy Documentation
☰

Crate generic_arrayvec

  • Re-exports
  • Modules
  • Structs
  • Traits
  • Type Definitions

Crates

  • generic_arrayvec
Change settings

Crate generic_arrayvec[−][src]

[−] Expand description

This crate provides interop between the arrayvec and generic_array crates, allowing you to use generic_array's GenericArray as the backing storage for the data structures in arrayvec. This lets you have vector and string types that store their contents inline, with a capacity that can be referred to in generic code.

Usage

This crate exposes the type aliases GenericArrayVecs and GenericArrayString, which are aliases of datatypes in the arrayvec crate, so see the ArrayVec and ArrayString docs to learn about their core functionality. Each one also has a corresponding extension trait GenericArrayVecExt and GenericArrayStringExt that provide additional constructors and conversions.

An example of instanciating and pushing an item onto a GenericArrayVec:

use generic_arrayvec::{GenericArrayVec, typenum::U5};

// Create a new GenericArrayVec of inferred element type with a capacity of 5
let mut arr = GenericArrayVec::<_, U5>::new();

arr.push(10);

Re-exports

pub extern crate arrayvec;
pub extern crate generic_array;

Modules

typenum

This crate provides type-level numbers evaluated at compile time. It depends only on libcore.

Structs

Wrapper

A wrapper around a GenericArray that implements the Array trait, allowing it to be used as the backing store for ArrayVec and ArrayString.

Traits

GenericArrayStringExt

Extension trait for GenericArrayString.

GenericArrayVecExt

Extension trait for GenericArrayVec.

Type Definitions

GenericArrayString

A GenericArray-backed ArrayString.

GenericArrayVec

A GenericArray-backed ArrayVec.

Results for generic_array

In Names
(1)
In Parameters
(1)
In Return Types
(4)
generic_arrayvecThis crate provides interop between the `arrayvec` and `generic_array` crates, allowing you to use `generic_array`'s [`GenericArray`] as the backing storage for the data structures in `arrayvec`. This lets you have vector and string types that store their contents inline, with a capacity that can be referred to in generic code. 
generic_arrayvec::Wrapper::from 
generic_arrayvec::Wrapper::into 
generic_arrayvec::Wrapper::into_innerReturns the inner `GenericArray` inside this `Wrapper` 
generic_arrayvec::GenericArrayVec::into_generic_arrayReturns the inner `GenericArray`, if `self` is full to its capacity. 
generic_arrayvec::GenericArrayVecExt::into_generic_array 

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)