Struct serde_lvm::TestNumbers
[−]
[src]
pub struct TestNumbers(_);
Test numbers in a TestSeries
Methods
impl TestNumbers
[src]
pub fn map<__SHRINKWRAP_T, __SHRINKWRAP_F: FnMut(Vec<TestNumber>) -> __SHRINKWRAP_T>(
self,
f: __SHRINKWRAP_F
) -> __SHRINKWRAP_T
[src]
self,
f: __SHRINKWRAP_F
) -> __SHRINKWRAP_T
Map a function over the wrapped value, consuming it in the process.
pub fn map_ref<__SHRINKWRAP_T, __SHRINKWRAP_F: FnMut(&Vec<TestNumber>) -> __SHRINKWRAP_T>(
&self,
f: __SHRINKWRAP_F
) -> __SHRINKWRAP_T
[src]
&self,
f: __SHRINKWRAP_F
) -> __SHRINKWRAP_T
Map a function over the wrapped value without consuming it.
Methods from Deref<Target = Vec<TestNumber>>
pub fn capacity(&self) -> usize
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);
pub fn as_slice(&self) -> &[T]
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();
pub fn len(&self) -> usize
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);
pub fn is_empty(&self) -> bool
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 Clone for TestNumbers
[src]
fn clone(&self) -> TestNumbers
[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 Debug for TestNumbers
[src]
fn fmt(&self, __arg_0: &mut Formatter) -> Result
[src]
Formats the value using the given formatter. Read more
impl Deref for TestNumbers
[src]
type Target = Vec<TestNumber>
The resulting type after dereferencing.
fn deref(&self) -> &Self::Target
[src]
Dereferences the value.
impl Borrow<Vec<TestNumber>> for TestNumbers
[src]
fn borrow(&self) -> &Vec<TestNumber>
[src]
Immutably borrows from an owned value. Read more
impl AsRef<Vec<TestNumber>> for TestNumbers
[src]
impl FromStr for TestNumbers
[src]
type Err = ()
The associated error which can be returned from parsing.
fn from_str(s: &str) -> Result<Self, Self::Err>
[src]
Parses a string s
to return a value of this type. Read more
impl<'de> Deserialize<'de> for TestNumbers
[src]
fn deserialize<D: Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error>
[src]
Deserialize this value from the given Serde deserializer. Read more
impl Display for TestNumbers
[src]
fn fmt(&self, f: &mut Formatter) -> Result<(), Error>
[src]
Formats the value using the given formatter. Read more