Lines Matching full:take
10 /// This struct is generally created by calling `take()` on `Buf`. See
11 /// documentation of [`take()`](Buf::take) for more details.
13 pub struct Take<T> { struct
18 pub fn new<T>(inner: T, limit: usize) -> Take<T> { in new() argument
19 Take { inner, limit } in new()
22 impl<T> Take<T> { impl
23 /// Consumes this `Take`, returning the underlying value.
30 /// let mut buf = b"hello world".take(2);
55 /// let buf = b"hello world".take(2);
72 /// let mut buf = b"hello world".take(2);
96 /// let mut buf = b"hello world".take(2);
118 /// let mut buf = b"hello world".take(2);
135 impl<T: Buf> Buf for Take<T> { implementation