A Vector is, like a BitStruct, a String. It retains all of the String methods, except for #[], #[]=, and each. These methods operate on entries instead of chars. Other methods, including length and slice, are unchanged. Hence a Vector can be used directly with sockets, binary files, etc.

Note that Vector is not a subclass of BitStruct. It cannot be used in a nest declaration in a BitStruct. Instead, use the vector declaration. See BitStruct::VectorField.

Different instances of the same Vector class may have different lengths, and a single instance can change its length. The length should always be a multiple of the struct size.