std::boxed::Box - Rust (original) (raw)
Struct std::boxed::Box1.0.0 [−] [src]
#[lang = "owned_box"]
pub struct Box(_)
where
T: ?Sized;
impl<T> [Box](../../std/boxed/struct.Box.html "struct std::boxed::Box")<T>
[src]
ⓘImportant traits for Box
pub fn [new](#method.new)(x: T) -> [Box](../../std/boxed/struct.Box.html "struct std::boxed::Box")<T>
[src]
Allocates memory on the heap and then places x
into it.
This doesn't actually allocate if T
is zero-sized.
let five = Box::new(5);Run
`impl Box where
ⓘImportant traits for Box
pub unsafe fn [from_raw](#method.from%5Fraw)(raw: [*mut T](../primitive.pointer.html)) -> [Box](../../std/boxed/struct.Box.html "struct std::boxed::Box")<T>
1.4.0
Constructs a box from a raw pointer.
After calling this function, the raw pointer is owned by the resulting Box
. Specifically, the Box
destructor will call the destructor of T
and free the allocated memory. Since the way Box
allocates and releases memory is unspecified, the only valid pointer to pass to this function is the one taken from another Box
via the Box::into_raw function.
This function is unsafe because improper use may lead to memory problems. For example, a double-free may occur if the function is called twice on the same raw pointer.
let x = Box::new(5); let ptr = Box::into_raw(x); let x = unsafe { Box::from_raw(ptr) };Run
pub fn [into_raw](#method.into%5Fraw)(b: [Box](../../std/boxed/struct.Box.html "struct std::boxed::Box")<T>) -> [*mut T](../primitive.pointer.html)
1.4.0
Consumes the Box
, returning the wrapped raw pointer.
After calling this function, the caller is responsible for the memory previously managed by the Box
. In particular, the caller should properly destroy T
and release the memory. The proper way to do so is to convert the raw pointer back into aBox
with the Box::from_raw function.
Note: this is an associated function, which means that you have to call it as Box::into_raw(b)
instead of b.into_raw()
. This is so that there is no conflict with a method on the inner type.
let x = Box::new(5); let ptr = Box::into_raw(x);Run
pub fn [into_raw_non_null](#method.into%5Fraw%5Fnon%5Fnull)(b: [Box](../../std/boxed/struct.Box.html "struct std::boxed::Box")<T>) -> [NonNull](../../std/ptr/struct.NonNull.html "struct std::ptr::NonNull")<T>
[src]
🔬 This is a nightly-only experimental API. (box_into_raw_non_null
#47336)
Consumes the Box
, returning the wrapped pointer as NonNull<T>
.
After calling this function, the caller is responsible for the memory previously managed by the Box
. In particular, the caller should properly destroy T
and release the memory. The proper way to do so is to convert the NonNull<T>
pointer into a raw pointer and back into a Box
with the Box::from_rawfunction.
Note: this is an associated function, which means that you have to call it as Box::into_raw_non_null(b)
instead of b.into_raw_non_null()
. This is so that there is no conflict with a method on the inner type.
#![feature(box_into_raw_non_null)]
fn main() { let x = Box::new(5); let ptr = Box::into_raw_non_null(x); }Run
pub fn [into_unique](#method.into%5Funique)(b: [Box](../../std/boxed/struct.Box.html "struct std::boxed::Box")<T>) -> [Unique](../../std/ptr/struct.Unique.html "struct std::ptr::Unique")<T>
[src]
🔬 This is a nightly-only experimental API. (ptr_internals
)
use into_raw_non_null instead
`pub fn leak<'a>(b: Box) -> &'a mut T where
T: 'a, `[src]
🔬 This is a nightly-only experimental API. (box_leak
#46179)
needs an FCP to stabilize
Consumes and leaks the Box
, returning a mutable reference,&'a mut T
. Here, the lifetime 'a
may be chosen to be 'static
.
This function is mainly useful for data that lives for the remainder of the program's life. Dropping the returned reference will cause a memory leak. If this is not acceptable, the reference should first be wrapped with the Box::from_raw function producing a Box
. This Box
can then be dropped which will properly destroy T
and release the allocated memory.
Note: this is an associated function, which means that you have to call it as Box::leak(b)
instead of b.leak()
. This is so that there is no conflict with a method on the inner type.
Simple usage:
#![feature(box_leak)]
fn main() { let x = Box::new(41); let static_ref: &'static mut usize = Box::leak(x); *static_ref += 1; assert_eq!(*static_ref, 42); }Run
Unsized data:
#![feature(box_leak)]
fn main() { let x = vec![1, 2, 3].into_boxed_slice(); let static_ref = Box::leak(x); static_ref[0] = 4; assert_eq!(*static_ref, [4, 2, 3]); }Run
impl [Box](../../std/boxed/struct.Box.html "struct std::boxed::Box")<[Any](../../std/any/trait.Any.html "trait std::any::Any") + 'static>
[src]
`pub fn downcast(self) -> Result<Box, Box<Any + 'static>> where
Attempt to downcast the box to a concrete type.
use std::any::Any;
fn print_if_string(value: Box) { if let Ok(string) = value.downcast::() { println!("String ({}): {}", string.len(), string); } }
fn main() { let my_string = "Hello World".to_string(); print_if_string(Box::new(my_string)); print_if_string(Box::new(0i8)); }Run
impl [Box](../../std/boxed/struct.Box.html "struct std::boxed::Box")<[Any](../../std/any/trait.Any.html "trait std::any::Any") + 'static + [Send](../../std/marker/trait.Send.html "trait std:📑:Send")>
[src]
`pub fn downcast(self) -> Result<Box, Box<Any + 'static + Send>> where
Attempt to downcast the box to a concrete type.
use std::any::Any;
fn print_if_string(value: Box<Any + Send>) { if let Ok(string) = value.downcast::() { println!("String ({}): {}", string.len(), string); } }
fn main() { let my_string = "Hello World".to_string(); print_if_string(Box::new(my_string)); print_if_string(Box::new(0i8)); }Run
`impl<T, U> CoerceUnsized<Box> for Box where
T: Unsize + ?Sized,
U: ?Sized, `[src]
`impl DoubleEndedIterator for Box where
I: DoubleEndedIterator + ?Sized, `[src]
fn [next_back](../../std/iter/trait.DoubleEndedIterator.html#tymethod.next%5Fback)(&mut self) -> [Option](../../std/option/enum.Option.html "enum std::option::Option")<<I as [Iterator](../../std/iter/trait.Iterator.html "trait std::iter::Iterator")>::[Item](../../std/iter/trait.Iterator.html#associatedtype.Item "type std::iter::Iterator::Item")>
[src]
Removes and returns an element from the end of the iterator. Read more
`fn try_rfold<B, F, R>(&mut self, init: B, f: F) -> R where
F: FnMut(B, Self::Item) -> R,
R: Try<Ok = B>, `[src]
🔬 This is a nightly-only experimental API. (iterator_try_fold
#45594)
This is the reverse version of [try_fold()
]: it takes elements starting from the back of the iterator. Read more
`fn rfold<B, F>(self, accum: B, f: F) -> B where
F: FnMut(B, Self::Item) -> B, `[src]
🔬 This is a nightly-only experimental API. (iter_rfold
#44705)
An iterator method that reduces the iterator's elements to a single, final value, starting from the back. Read more
`fn rfind
(&mut self, predicate: P) -> Option<Self::Item> where
P: FnMut(&Self::Item) -> bool, `[src]
🔬 This is a nightly-only experimental API. (iter_rfind
#39480)
Searches for an element of an iterator from the right that satisfies a predicate. Read more
`impl<'a, T> From<&'a [T]> for Box<T[]> where
T: Copy, `
1.17.0
impl<'a> [From](../../std/convert/trait.From.html "trait std::convert::From")<&'a [str](../primitive.str.html)> for [Box](../../std/boxed/struct.Box.html "struct std::boxed::Box")<[str](../primitive.str.html)>
1.17.0
`impl From<Box> for Rc where
T: ?Sized, `
1.21.0
impl [From](../../std/convert/trait.From.html "trait std::convert::From")<[Box](../../std/boxed/struct.Box.html "struct std::boxed::Box")<[str](../primitive.str.html)>> for [Box](../../std/boxed/struct.Box.html "struct std::boxed::Box")<[[](../primitive.slice.html)[u8](../primitive.u8.html)[]](../primitive.slice.html)>
1.19.0
impl [From](../../std/convert/trait.From.html "trait std::convert::From")<[String](../../std/string/struct.String.html "struct std:🧵:String")> for [Box](../../std/boxed/struct.Box.html "struct std::boxed::Box")<[str](../primitive.str.html)>
1.20.0
impl [From](../../std/convert/trait.From.html "trait std::convert::From")<[Box](../../std/boxed/struct.Box.html "struct std::boxed::Box")<[str](../primitive.str.html)>> for [String](../../std/string/struct.String.html "struct std:🧵:String")
1.18.0
impl<T> [From](../../std/convert/trait.From.html "trait std::convert::From")<[Box](../../std/boxed/struct.Box.html "struct std::boxed::Box")<[[](../primitive.slice.html)T[]](../primitive.slice.html)>> for [Vec](../../std/vec/struct.Vec.html "struct std::vec::Vec")<T>
1.18.0
impl<T> [From](../../std/convert/trait.From.html "trait std::convert::From")<T> for [Box](../../std/boxed/struct.Box.html "struct std::boxed::Box")<T>
1.6.0
ⓘImportant traits for Box
fn [from](../../std/convert/trait.From.html#tymethod.from)(t: T) -> [Box](../../std/boxed/struct.Box.html "struct std::boxed::Box")<T>
[src]
Performs the conversion.
impl<T> [From](../../std/convert/trait.From.html "trait std::convert::From")<[Vec](../../std/vec/struct.Vec.html "struct std::vec::Vec")<T>> for [Box](../../std/boxed/struct.Box.html "struct std::boxed::Box")<[[](../primitive.slice.html)T[]](../primitive.slice.html)>
1.20.0
`impl From<Box> for Arc where
T: ?Sized, `
1.21.0
`impl Borrow for Box where
T: ?Sized, `
1.1.0
`impl BorrowMut for Box where
T: ?Sized, `
1.1.0
`impl Ord for Box where
fn [cmp](../../std/cmp/trait.Ord.html#tymethod.cmp)(&self, other: &[Box](../../std/boxed/struct.Box.html "struct std::boxed::Box")<T>) -> [Ordering](../../std/cmp/enum.Ordering.html "enum std::cmp::Ordering")
[src]
This method returns an Ordering
between self
and other
. Read more
fn [max](../../std/cmp/trait.Ord.html#method.max)(self, other: Self) -> Self
1.21.0
Compares and returns the maximum of two values. Read more
fn [min](../../std/cmp/trait.Ord.html#method.min)(self, other: Self) -> Self
1.21.0
Compares and returns the minimum of two values. Read more
`impl Clone for Box where
ⓘImportant traits for Box
fn [clone](../../std/clone/trait.Clone.html#tymethod.clone)(&self) -> [Box](../../std/boxed/struct.Box.html "struct std::boxed::Box")<T>
[src]
Returns a new box with a clone()
of this box's contents.
let x = Box::new(5); let y = x.clone();Run
fn [clone_from](../../std/clone/trait.Clone.html#method.clone%5Ffrom)(&mut self, source: &[Box](../../std/boxed/struct.Box.html "struct std::boxed::Box")<T>)
[src]
Copies source
's contents into self
without creating a new allocation.
let x = Box::new(5); let mut y = Box::new(10);
y.clone_from(&x);
assert_eq!(*y, 5);Run
`impl Clone for Box<T[]> where
T: Clone, `
1.3.0
impl [Clone](../../std/clone/trait.Clone.html "trait std::clone::Clone") for [Box](../../std/boxed/struct.Box.html "struct std::boxed::Box")<[str](../primitive.str.html)>
1.3.0
`impl DerefMut for Box where
impl<'a, A, R> [FnOnce](../../std/ops/trait.FnOnce.html "trait std::ops::FnOnce")<A> for [Box](../../std/boxed/struct.Box.html "struct std::boxed::Box")<[FnBox](../../std/boxed/trait.FnBox.html "trait std::boxed::FnBox")<A, Output = R> + 'a>
[src]
type [Output](../../std/ops/trait.FnOnce.html#associatedtype.Output) = R
The returned type after the call operator is used.
extern "rust-call" fn [call_once](../../std/ops/trait.FnOnce.html#tymethod.call%5Fonce)(self, args: A) -> R
[src]
🔬 This is a nightly-only experimental API. (fn_traits
#29625)
Performs the call operation.
impl<'a, A, R> [FnOnce](../../std/ops/trait.FnOnce.html "trait std::ops::FnOnce")<A> for [Box](../../std/boxed/struct.Box.html "struct std::boxed::Box")<[FnBox](../../std/boxed/trait.FnBox.html "trait std::boxed::FnBox")<A, Output = R> + 'a + [Send](../../std/marker/trait.Send.html "trait std:📑:Send")>
[src]
type [Output](../../std/ops/trait.FnOnce.html#associatedtype.Output) = R
The returned type after the call operator is used.
extern "rust-call" fn [call_once](../../std/ops/trait.FnOnce.html#tymethod.call%5Fonce)(self, args: A) -> R
[src]
🔬 This is a nightly-only experimental API. (fn_traits
#29625)
Performs the call operation.
`impl Hash for Box where
`impl AsMut for Box where
T: ?Sized, `
1.5.0
`impl PartialEq<Box> for Box where
fn [eq](../../std/cmp/trait.PartialEq.html#tymethod.eq)(&self, other: &[Box](../../std/boxed/struct.Box.html "struct std::boxed::Box")<T>) -> [bool](../primitive.bool.html)
[src]
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn [ne](../../std/cmp/trait.PartialEq.html#method.ne)(&self, other: &[Box](../../std/boxed/struct.Box.html "struct std::boxed::Box")<T>) -> [bool](../primitive.bool.html)
[src]
This method tests for !=
.
`impl Iterator for Box where
type [Item](../../std/iter/trait.Iterator.html#associatedtype.Item) = <I as [Iterator](../../std/iter/trait.Iterator.html "trait std::iter::Iterator")>::[Item](../../std/iter/trait.Iterator.html#associatedtype.Item "type std::iter::Iterator::Item")
The type of the elements being iterated over.
fn [next](../../std/iter/trait.Iterator.html#tymethod.next)(&mut self) -> [Option](../../std/option/enum.Option.html "enum std::option::Option")<<I as [Iterator](../../std/iter/trait.Iterator.html "trait std::iter::Iterator")>::[Item](../../std/iter/trait.Iterator.html#associatedtype.Item "type std::iter::Iterator::Item")>
[src]
Advances the iterator and returns the next value. Read more
fn [size_hint](../../std/iter/trait.Iterator.html#method.size%5Fhint)(&self) -> [(](../primitive.tuple.html)[usize](../primitive.usize.html), [Option](../../std/option/enum.Option.html "enum std::option::Option")<[usize](../primitive.usize.html)>[)](../primitive.tuple.html)
[src]
Returns the bounds on the remaining length of the iterator. Read more
fn [nth](../../std/iter/trait.Iterator.html#method.nth)(&mut self, n: [usize](../primitive.usize.html)) -> [Option](../../std/option/enum.Option.html "enum std::option::Option")<<I as [Iterator](../../std/iter/trait.Iterator.html "trait std::iter::Iterator")>::[Item](../../std/iter/trait.Iterator.html#associatedtype.Item "type std::iter::Iterator::Item")>
[src]
Returns the n
th element of the iterator. Read more
fn [count](../../std/iter/trait.Iterator.html#method.count)(self) -> [usize](../primitive.usize.html)
[src]
Consumes the iterator, counting the number of iterations and returning it. Read more
fn [last](../../std/iter/trait.Iterator.html#method.last)(self) -> [Option](../../std/option/enum.Option.html "enum std::option::Option")<Self::[Item](../../std/iter/trait.Iterator.html#associatedtype.Item "type std::iter::Iterator::Item")>
[src]
Consumes the iterator, returning the last element. Read more
ⓘImportant traits for StepBy
fn [step_by](../../std/iter/trait.Iterator.html#method.step%5Fby)(self, step: [usize](../primitive.usize.html)) -> [StepBy](../../std/iter/struct.StepBy.html "struct std::iter::StepBy")<Self>
[src]
🔬 This is a nightly-only experimental API. (iterator_step_by
#27741)
unstable replacement of Range::step_by
Creates an iterator starting at the same point, but stepping by the given amount at each iteration. Read more
ⓘImportant traits for Chain<A, B>
fn [chain](../../std/iter/trait.Iterator.html#method.chain)<U>(self, other: U) -> [Chain](../../std/iter/struct.Chain.html "struct std::iter::Chain")<Self, <U as [IntoIterator](../../std/iter/trait.IntoIterator.html "trait std::iter::IntoIterator")>::[IntoIter](../../std/iter/trait.IntoIterator.html#associatedtype.IntoIter "type std::iter::IntoIterator::IntoIter")> where U: [IntoIterator](../../std/iter/trait.IntoIterator.html "trait std::iter::IntoIterator")<Item = Self::[Item](../../std/iter/trait.Iterator.html#associatedtype.Item "type std::iter::Iterator::Item")>,
[src]
Takes two iterators and creates a new iterator over both in sequence. Read more
ⓘImportant traits for Zip<A, B>
fn [zip](../../std/iter/trait.Iterator.html#method.zip)<U>(self, other: U) -> [Zip](../../std/iter/struct.Zip.html "struct std::iter::Zip")<Self, <U as [IntoIterator](../../std/iter/trait.IntoIterator.html "trait std::iter::IntoIterator")>::[IntoIter](../../std/iter/trait.IntoIterator.html#associatedtype.IntoIter "type std::iter::IntoIterator::IntoIter")> where U: [IntoIterator](../../std/iter/trait.IntoIterator.html "trait std::iter::IntoIterator"),
[src]
'Zips up' two iterators into a single iterator of pairs. Read more
ⓘImportant traits for Map<I, F>
fn [map](../../std/iter/trait.Iterator.html#method.map)<B, F>(self, f: F) -> [Map](../../std/iter/struct.Map.html "struct std::iter::Map")<Self, F> where F: [FnMut](../../std/ops/trait.FnMut.html "trait std::ops::FnMut")(Self::[Item](../../std/iter/trait.Iterator.html#associatedtype.Item "type std::iter::Iterator::Item")) -> B,
[src]
Takes a closure and creates an iterator which calls that closure on each element. Read more
`fn for_each(self, f: F) where
1.21.0
Calls a closure on each element of an iterator. Read more
ⓘImportant traits for Filter<I, P>
fn [filter](../../std/iter/trait.Iterator.html#method.filter)<P>(self, predicate: P) -> [Filter](../../std/iter/struct.Filter.html "struct std::iter::Filter")<Self, P> where P: [FnMut](../../std/ops/trait.FnMut.html "trait std::ops::FnMut")(&Self::[Item](../../std/iter/trait.Iterator.html#associatedtype.Item "type std::iter::Iterator::Item")) -> [bool](../primitive.bool.html),
[src]
Creates an iterator which uses a closure to determine if an element should be yielded. Read more
`fn filter_map<B, F>(self, f: F) -> FilterMap<Self, F> where
F: FnMut(Self::Item) -> Option, `[src]
Creates an iterator that both filters and maps. Read more
fn [enumerate](../../std/iter/trait.Iterator.html#method.enumerate)(self) -> [Enumerate](../../std/iter/struct.Enumerate.html "struct std::iter::Enumerate")<Self>
[src]
Creates an iterator which gives the current iteration count as well as the next value. Read more
fn [peekable](../../std/iter/trait.Iterator.html#method.peekable)(self) -> [Peekable](../../std/iter/struct.Peekable.html "struct std::iter::Peekable")<Self>
[src]
Creates an iterator which can use peek
to look at the next element of the iterator without consuming it. Read more
`fn skip_while
(self, predicate: P) -> SkipWhile<Self, P> where
P: FnMut(&Self::Item) -> bool, `[src]
Creates an iterator that [skip
]s elements based on a predicate. Read more
`fn take_while
(self, predicate: P) -> TakeWhile<Self, P> where
P: FnMut(&Self::Item) -> bool, `[src]
Creates an iterator that yields elements based on a predicate. Read more
ⓘImportant traits for Skip
fn [skip](../../std/iter/trait.Iterator.html#method.skip)(self, n: [usize](../primitive.usize.html)) -> [Skip](../../std/iter/struct.Skip.html "struct std::iter::Skip")<Self>
[src]
Creates an iterator that skips the first n
elements. Read more
ⓘImportant traits for Take
fn [take](../../std/iter/trait.Iterator.html#method.take)(self, n: [usize](../primitive.usize.html)) -> [Take](../../std/iter/struct.Take.html "struct std::iter::Take")<Self>
[src]
Creates an iterator that yields its first n
elements. Read more
ⓘImportant traits for Scan<I, St, F>
Important traits for Scan<I, St, F>
impl<B, I, St, F> [Iterator](../../std/iter/trait.Iterator.html "trait std::iter::Iterator") for [Scan](../../std/iter/struct.Scan.html "struct std::iter::Scan")<I, St, F> where F: [FnMut](../../std/ops/trait.FnMut.html "trait std::ops::FnMut")([&mut ](../primitive.reference.html)St, <I as [Iterator](../../std/iter/trait.Iterator.html "trait std::iter::Iterator")>::[Item](../../std/iter/trait.Iterator.html#associatedtype.Item "type std::iter::Iterator::Item")) -> [Option](../../std/option/enum.Option.html "enum std::option::Option")<B>, I: [Iterator](../../std/iter/trait.Iterator.html "trait std::iter::Iterator"), type [Item](../../std/iter/trait.Iterator.html#associatedtype.Item) = B;
fn [scan](../../std/iter/trait.Iterator.html#method.scan)<St, B, F>(self, initial_state: St, f: F) -> [Scan](../../std/iter/struct.Scan.html "struct std::iter::Scan")<Self, St, F> where F: [FnMut](../../std/ops/trait.FnMut.html "trait std::ops::FnMut")([&mut ](../primitive.reference.html)St, Self::[Item](../../std/iter/trait.Iterator.html#associatedtype.Item "type std::iter::Iterator::Item")) -> [Option](../../std/option/enum.Option.html "enum std::option::Option")<B>,
[src]
An iterator adaptor similar to [fold
] that holds internal state and produces a new iterator. Read more
ⓘImportant traits for FlatMap<I, U, F>
fn [flat_map](../../std/iter/trait.Iterator.html#method.flat%5Fmap)<U, F>(self, f: F) -> [FlatMap](../../std/iter/struct.FlatMap.html "struct std::iter::FlatMap")<Self, U, F> where F: [FnMut](../../std/ops/trait.FnMut.html "trait std::ops::FnMut")(Self::[Item](../../std/iter/trait.Iterator.html#associatedtype.Item "type std::iter::Iterator::Item")) -> U, U: [IntoIterator](../../std/iter/trait.IntoIterator.html "trait std::iter::IntoIterator"),
[src]
Creates an iterator that works like map, but flattens nested structure. Read more
ⓘImportant traits for Fuse
fn [fuse](../../std/iter/trait.Iterator.html#method.fuse)(self) -> [Fuse](../../std/iter/struct.Fuse.html "struct std::iter::Fuse")<Self>
[src]
Creates an iterator which ends after the first [None
]. Read more
ⓘImportant traits for Inspect<I, F>
fn [inspect](../../std/iter/trait.Iterator.html#method.inspect)<F>(self, f: F) -> [Inspect](../../std/iter/struct.Inspect.html "struct std::iter::Inspect")<Self, F> where F: [FnMut](../../std/ops/trait.FnMut.html "trait std::ops::FnMut")(&Self::[Item](../../std/iter/trait.Iterator.html#associatedtype.Item "type std::iter::Iterator::Item")),
[src]
Do something with each element of an iterator, passing the value on. Read more
fn [by_ref](../../std/iter/trait.Iterator.html#method.by%5Fref)(&mut self) -> [&mut ](../primitive.reference.html)Self
[src]
Borrows an iterator, rather than consuming it. Read more
`fn collect(self) -> B where
B: FromIterator<Self::Item>, `[src]
Transforms an iterator into a collection. Read more
`fn partition<B, F>(self, f: F) -> (B, B) where
B: Default + Extend<Self::Item>,
F: FnMut(&Self::Item) -> bool, `[src]
Consumes an iterator, creating two collections from it. Read more
`fn try_fold<B, F, R>(&mut self, init: B, f: F) -> R where
F: FnMut(B, Self::Item) -> R,
R: Try<Ok = B>, `[src]
🔬 This is a nightly-only experimental API. (iterator_try_fold
#45594)
An iterator method that applies a function as long as it returns successfully, producing a single, final value. Read more
`fn fold<B, F>(self, init: B, f: F) -> B where
F: FnMut(B, Self::Item) -> B, `[src]
An iterator method that applies a function, producing a single, final value. Read more
`fn all(&mut self, f: F) -> bool where
F: FnMut(Self::Item) -> bool, `[src]
Tests if every element of the iterator matches a predicate. Read more
`fn any(&mut self, f: F) -> bool where
F: FnMut(Self::Item) -> bool, `[src]
Tests if any element of the iterator matches a predicate. Read more
`fn find
(&mut self, predicate: P) -> Option<Self::Item> where
P: FnMut(&Self::Item) -> bool, `[src]
Searches for an element of an iterator that satisfies a predicate. Read more
`fn position
(&mut self, predicate: P) -> Option<usize> where
P: FnMut(Self::Item) -> bool, `[src]
Searches for an element in an iterator, returning its index. Read more
`fn rposition
(&mut self, predicate: P) -> Option<usize> where
P: FnMut(Self::Item) -> bool,
Self: ExactSizeIterator + DoubleEndedIterator, `[src]
Searches for an element in an iterator from the right, returning its index. Read more
`fn max(self) -> Option<Self::Item> where
Returns the maximum element of an iterator. Read more
`fn min(self) -> Option<Self::Item> where
Returns the minimum element of an iterator. Read more
`fn max_by_key<B, F>(self, f: F) -> Option<Self::Item> where
B: Ord,
F: FnMut(&Self::Item) -> B, `
1.6.0
Returns the element that gives the maximum value from the specified function. Read more
`fn max_by(self, compare: F) -> Option<Self::Item> where
F: FnMut(&Self::Item, &Self::Item) -> Ordering, `
1.15.0
Returns the element that gives the maximum value with respect to the specified comparison function. Read more
`fn min_by_key<B, F>(self, f: F) -> Option<Self::Item> where
B: Ord,
F: FnMut(&Self::Item) -> B, `
1.6.0
Returns the element that gives the minimum value from the specified function. Read more
`fn min_by(self, compare: F) -> Option<Self::Item> where
F: FnMut(&Self::Item, &Self::Item) -> Ordering, `
1.15.0
Returns the element that gives the minimum value with respect to the specified comparison function. Read more
ⓘImportant traits for Rev
fn [rev](../../std/iter/trait.Iterator.html#method.rev)(self) -> [Rev](../../std/iter/struct.Rev.html "struct std::iter::Rev")<Self> where Self: [DoubleEndedIterator](../../std/iter/trait.DoubleEndedIterator.html "trait std::iter::DoubleEndedIterator"),
[src]
Reverses an iterator's direction. Read more
`fn unzip<A, B, FromA, FromB>(self) -> (FromA, FromB) where
FromA: Default + Extend,
FromB: Default + Extend,
Self: Iterator<Item = (A, B)>, `[src]
Converts an iterator of pairs into a pair of containers. Read more
ⓘImportant traits for Cloned
fn [cloned](../../std/iter/trait.Iterator.html#method.cloned)<'a, T>(self) -> [Cloned](../../std/iter/struct.Cloned.html "struct std::iter::Cloned")<Self> where Self: [Iterator](../../std/iter/trait.Iterator.html "trait std::iter::Iterator")<Item = [&'a ](../primitive.reference.html)T>, T: 'a + [Clone](../../std/clone/trait.Clone.html "trait std::clone::Clone"),
[src]
Creates an iterator which [clone
]s all of its elements. Read more
ⓘImportant traits for Cycle
fn [cycle](../../std/iter/trait.Iterator.html#method.cycle)(self) -> [Cycle](../../std/iter/struct.Cycle.html "struct std::iter::Cycle")<Self> where Self: [Clone](../../std/clone/trait.Clone.html "trait std::clone::Clone"),
[src]
Repeats an iterator endlessly. Read more
`fn sum(self) -> S where
1.11.0
Sums the elements of an iterator. Read more
`fn product
(self) -> P where
1.11.0
Iterates over the entire iterator, multiplying all the elements Read more
`fn cmp(self, other: I) -> Ordering where
I: IntoIterator<Item = Self::Item>,
Self::Item: Ord, `
1.5.0
Lexicographically compares the elements of this Iterator
with those of another. Read more
`fn partial_cmp(self, other: I) -> Option<Ordering> where
I: IntoIterator,
Self::Item: PartialOrd<<I as IntoIterator>::Item>, `
1.5.0
Lexicographically compares the elements of this Iterator
with those of another. Read more
`fn eq(self, other: I) -> bool where
I: IntoIterator,
Self::Item: PartialEq<<I as IntoIterator>::Item>, `
1.5.0
Determines if the elements of this Iterator
are equal to those of another. Read more
`fn ne(self, other: I) -> bool where
I: IntoIterator,
Self::Item: PartialEq<<I as IntoIterator>::Item>, `
1.5.0
Determines if the elements of this Iterator
are unequal to those of another. Read more
`fn lt(self, other: I) -> bool where
I: IntoIterator,
Self::Item: PartialOrd<<I as IntoIterator>::Item>, `
1.5.0
Determines if the elements of this Iterator
are lexicographically less than those of another. Read more
`fn le(self, other: I) -> bool where
I: IntoIterator,
Self::Item: PartialOrd<<I as IntoIterator>::Item>, `
1.5.0
Determines if the elements of this Iterator
are lexicographically less or equal to those of another. Read more
`fn gt(self, other: I) -> bool where
I: IntoIterator,
Self::Item: PartialOrd<<I as IntoIterator>::Item>, `
1.5.0
Determines if the elements of this Iterator
are lexicographically greater than those of another. Read more
`fn ge(self, other: I) -> bool where
I: IntoIterator,
Self::Item: PartialOrd<<I as IntoIterator>::Item>, `
1.5.0
Determines if the elements of this Iterator
are lexicographically greater than or equal to those of another. Read more
`impl Display for Box where
`impl Eq for Box where
`impl ExactSizeIterator for Box where
I: ExactSizeIterator + ?Sized, `[src]
impl<T> [Boxed](../../std/ops/trait.Boxed.html "trait std::ops::Boxed") for [Box](../../std/boxed/struct.Box.html "struct std::boxed::Box")<T>
[src]
type [Data](../../std/ops/trait.Boxed.html#associatedtype.Data) = T
🔬 This is a nightly-only experimental API. (placement_new_protocol
#27779)
The kind of data that is stored in this kind of box.
type [Place](../../std/ops/trait.Boxed.html#associatedtype.Place) = [IntermediateBox](../../std/boxed/struct.IntermediateBox.html "struct std::boxed::IntermediateBox")<T>
🔬 This is a nightly-only experimental API. (placement_new_protocol
#27779)
The place that will negotiate the storage of the data.
ⓘImportant traits for Box
unsafe fn [finalize](../../std/ops/trait.Boxed.html#tymethod.finalize)(b: [IntermediateBox](../../std/boxed/struct.IntermediateBox.html "struct std::boxed::IntermediateBox")<T>) -> [Box](../../std/boxed/struct.Box.html "struct std::boxed::Box")<T>
[src]
🔬 This is a nightly-only experimental API. (placement_new_protocol
#27779)
Converts filled place into final owning value, shifting deallocation/cleanup responsibilities (if any remain), over to returned instance of Self
and forgetting filled
. Read more
`impl AsRef for Box where
T: ?Sized, `
1.5.0
impl [Default](../../std/default/trait.Default.html "trait std::default::Default") for [Box](../../std/boxed/struct.Box.html "struct std::boxed::Box")<[str](../primitive.str.html)>
1.17.0
`impl Default for Box where
ⓘImportant traits for Box
fn [default](../../std/default/trait.Default.html#tymethod.default)() -> [Box](../../std/boxed/struct.Box.html "struct std::boxed::Box")<T>
[src]
Creates a Box<T>
, with the Default
value for T.
impl<T> [Default](../../std/default/trait.Default.html "trait std::default::Default") for [Box](../../std/boxed/struct.Box.html "struct std::boxed::Box")<[[](../primitive.slice.html)T[]](../primitive.slice.html)>
[src]
`impl Hasher for Box where
1.22.0
fn [finish](../../std/hash/trait.Hasher.html#tymethod.finish)(&self) -> [u64](../primitive.u64.html)
[src]
Returns the hash value for the values written so far. Read more
fn [write](../../std/hash/trait.Hasher.html#tymethod.write)(&mut self, bytes: [&[](../primitive.slice.html)[u8](../primitive.u8.html)[]](../primitive.slice.html))
[src]
Writes some data into this Hasher
. Read more
fn [write_u8](../../std/hash/trait.Hasher.html#method.write%5Fu8)(&mut self, i: [u8](../primitive.u8.html))
[src]
Writes a single u8
into this hasher.
fn [write_u16](../../std/hash/trait.Hasher.html#method.write%5Fu16)(&mut self, i: [u16](../primitive.u16.html))
[src]
Writes a single u16
into this hasher.
fn [write_u32](../../std/hash/trait.Hasher.html#method.write%5Fu32)(&mut self, i: [u32](../primitive.u32.html))
[src]
Writes a single u32
into this hasher.
fn [write_u64](../../std/hash/trait.Hasher.html#method.write%5Fu64)(&mut self, i: [u64](../primitive.u64.html))
[src]
Writes a single u64
into this hasher.
fn [write_u128](../../std/hash/trait.Hasher.html#method.write%5Fu128)(&mut self, i: [u128](../primitive.u128.html))
[src]
🔬 This is a nightly-only experimental API. (i128
#35118)
Writes a single u128
into this hasher.
fn [write_usize](../../std/hash/trait.Hasher.html#method.write%5Fusize)(&mut self, i: [usize](../primitive.usize.html))
[src]
Writes a single usize
into this hasher.
fn [write_i8](../../std/hash/trait.Hasher.html#method.write%5Fi8)(&mut self, i: [i8](../primitive.i8.html))
[src]
Writes a single i8
into this hasher.
fn [write_i16](../../std/hash/trait.Hasher.html#method.write%5Fi16)(&mut self, i: [i16](../primitive.i16.html))
[src]
Writes a single i16
into this hasher.
fn [write_i32](../../std/hash/trait.Hasher.html#method.write%5Fi32)(&mut self, i: [i32](../primitive.i32.html))
[src]
Writes a single i32
into this hasher.
fn [write_i64](../../std/hash/trait.Hasher.html#method.write%5Fi64)(&mut self, i: [i64](../primitive.i64.html))
[src]
Writes a single i64
into this hasher.
fn [write_i128](../../std/hash/trait.Hasher.html#method.write%5Fi128)(&mut self, i: [i128](../primitive.i128.html))
[src]
🔬 This is a nightly-only experimental API. (i128
#35118)
Writes a single i128
into this hasher.
fn [write_isize](../../std/hash/trait.Hasher.html#method.write%5Fisize)(&mut self, i: [isize](../primitive.isize.html))
[src]
Writes a single isize
into this hasher.
`impl Generator for Box where
`impl Debug for Box where
`impl Deref for Box where
type [Target](../../std/ops/trait.Deref.html#associatedtype.Target) = T
The resulting type after dereferencing.
fn [deref](../../std/ops/trait.Deref.html#tymethod.deref)(&self) -> [&](../primitive.reference.html)T
[src]
Dereferences the value.
`impl PartialOrd<Box> for Box where
T: PartialOrd + ?Sized, `[src]
fn [partial_cmp](../../std/cmp/trait.PartialOrd.html#tymethod.partial%5Fcmp)(&self, other: &[Box](../../std/boxed/struct.Box.html "struct std::boxed::Box")<T>) -> [Option](../../std/option/enum.Option.html "enum std::option::Option")<[Ordering](../../std/cmp/enum.Ordering.html "enum std::cmp::Ordering")>
[src]
This method returns an ordering between self
and other
values if one exists. Read more
fn [lt](../../std/cmp/trait.PartialOrd.html#method.lt)(&self, other: &[Box](../../std/boxed/struct.Box.html "struct std::boxed::Box")<T>) -> [bool](../primitive.bool.html)
[src]
This method tests less than (for self
and other
) and is used by the <
operator. Read more
fn [le](../../std/cmp/trait.PartialOrd.html#method.le)(&self, other: &[Box](../../std/boxed/struct.Box.html "struct std::boxed::Box")<T>) -> [bool](../primitive.bool.html)
[src]
This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
fn [ge](../../std/cmp/trait.PartialOrd.html#method.ge)(&self, other: &[Box](../../std/boxed/struct.Box.html "struct std::boxed::Box")<T>) -> [bool](../primitive.bool.html)
[src]
This method tests greater than or equal to (for self
and other
) and is used by the >=
operator. Read more
fn [gt](../../std/cmp/trait.PartialOrd.html#method.gt)(&self, other: &[Box](../../std/boxed/struct.Box.html "struct std::boxed::Box")<T>) -> [bool](../primitive.bool.html)
[src]
This method tests greater than (for self
and other
) and is used by the >
operator. Read more
`impl FusedIterator for Box where
I: FusedIterator + ?Sized, `[src]
`impl Pointer for Box where
`impl Drop for Box where
impl<'a, E: [Error](../../std/error/trait.Error.html "trait std::error::Error") + 'a> [From](../../std/convert/trait.From.html "trait std::convert::From")<E> for [Box](../../std/boxed/struct.Box.html "struct std::boxed::Box")<[Error](../../std/error/trait.Error.html "trait std::error::Error") + 'a>
[src]
impl<'a, E: [Error](../../std/error/trait.Error.html "trait std::error::Error") + [Send](../../std/marker/trait.Send.html "trait std:📑:Send") + [Sync](../../std/marker/trait.Sync.html "trait std:📑:Sync") + 'a> [From](../../std/convert/trait.From.html "trait std::convert::From")<E> for [Box](../../std/boxed/struct.Box.html "struct std::boxed::Box")<[Error](../../std/error/trait.Error.html "trait std::error::Error") + [Send](../../std/marker/trait.Send.html "trait std:📑:Send") + [Sync](../../std/marker/trait.Sync.html "trait std:📑:Sync") + 'a>
[src]
impl [From](../../std/convert/trait.From.html "trait std::convert::From")<[String](../../std/string/struct.String.html "struct std:🧵:String")> for [Box](../../std/boxed/struct.Box.html "struct std::boxed::Box")<[Error](../../std/error/trait.Error.html "trait std::error::Error") + [Send](../../std/marker/trait.Send.html "trait std:📑:Send") + [Sync](../../std/marker/trait.Sync.html "trait std:📑:Sync")>
[src]
impl [From](../../std/convert/trait.From.html "trait std::convert::From")<[String](../../std/string/struct.String.html "struct std:🧵:String")> for [Box](../../std/boxed/struct.Box.html "struct std::boxed::Box")<[Error](../../std/error/trait.Error.html "trait std::error::Error")>
1.6.0
impl<'a, 'b> [From](../../std/convert/trait.From.html "trait std::convert::From")<&'b [str](../primitive.str.html)> for [Box](../../std/boxed/struct.Box.html "struct std::boxed::Box")<[Error](../../std/error/trait.Error.html "trait std::error::Error") + [Send](../../std/marker/trait.Send.html "trait std:📑:Send") + [Sync](../../std/marker/trait.Sync.html "trait std:📑:Sync") + 'a>
[src]
impl<'a> [From](../../std/convert/trait.From.html "trait std::convert::From")<&'a [str](../primitive.str.html)> for [Box](../../std/boxed/struct.Box.html "struct std::boxed::Box")<[Error](../../std/error/trait.Error.html "trait std::error::Error")>
1.6.0
impl<'a, 'b> [From](../../std/convert/trait.From.html "trait std::convert::From")<[Cow](../../std/borrow/enum.Cow.html "enum std::borrow::Cow")<'b, [str](../primitive.str.html)>> for [Box](../../std/boxed/struct.Box.html "struct std::boxed::Box")<[Error](../../std/error/trait.Error.html "trait std::error::Error") + [Send](../../std/marker/trait.Send.html "trait std:📑:Send") + [Sync](../../std/marker/trait.Sync.html "trait std:📑:Sync") + 'a>
1.22.0
impl<'a> [From](../../std/convert/trait.From.html "trait std::convert::From")<[Cow](../../std/borrow/enum.Cow.html "enum std::borrow::Cow")<'a, [str](../primitive.str.html)>> for [Box](../../std/boxed/struct.Box.html "struct std::boxed::Box")<[Error](../../std/error/trait.Error.html "trait std::error::Error")>
1.22.0
impl<T: [Error](../../std/error/trait.Error.html "trait std::error::Error")> [Error](../../std/error/trait.Error.html "trait std::error::Error") for [Box](../../std/boxed/struct.Box.html "struct std::boxed::Box")<T>
1.8.0
impl<'a> [From](../../std/convert/trait.From.html "trait std::convert::From")<&'a [CStr](../../std/ffi/struct.CStr.html "struct std::ffi::CStr")> for [Box](../../std/boxed/struct.Box.html "struct std::boxed::Box")<[CStr](../../std/ffi/struct.CStr.html "struct std::ffi::CStr")>
1.17.0
impl [From](../../std/convert/trait.From.html "trait std::convert::From")<[Box](../../std/boxed/struct.Box.html "struct std::boxed::Box")<[CStr](../../std/ffi/struct.CStr.html "struct std::ffi::CStr")>> for [CString](../../std/ffi/struct.CString.html "struct std::ffi::CString")
1.18.0
impl [From](../../std/convert/trait.From.html "trait std::convert::From")<[CString](../../std/ffi/struct.CString.html "struct std::ffi::CString")> for [Box](../../std/boxed/struct.Box.html "struct std::boxed::Box")<[CStr](../../std/ffi/struct.CStr.html "struct std::ffi::CStr")>
1.20.0
impl [Default](../../std/default/trait.Default.html "trait std::default::Default") for [Box](../../std/boxed/struct.Box.html "struct std::boxed::Box")<[CStr](../../std/ffi/struct.CStr.html "struct std::ffi::CStr")>
1.17.0
impl<'a> [From](../../std/convert/trait.From.html "trait std::convert::From")<&'a [OsStr](../../std/ffi/struct.OsStr.html "struct std::ffi::OsStr")> for [Box](../../std/boxed/struct.Box.html "struct std::boxed::Box")<[OsStr](../../std/ffi/struct.OsStr.html "struct std::ffi::OsStr")>
1.17.0
impl [From](../../std/convert/trait.From.html "trait std::convert::From")<[Box](../../std/boxed/struct.Box.html "struct std::boxed::Box")<[OsStr](../../std/ffi/struct.OsStr.html "struct std::ffi::OsStr")>> for [OsString](../../std/ffi/struct.OsString.html "struct std::ffi::OsString")
1.18.0
impl [From](../../std/convert/trait.From.html "trait std::convert::From")<[OsString](../../std/ffi/struct.OsString.html "struct std::ffi::OsString")> for [Box](../../std/boxed/struct.Box.html "struct std::boxed::Box")<[OsStr](../../std/ffi/struct.OsStr.html "struct std::ffi::OsStr")>
1.20.0
impl [Default](../../std/default/trait.Default.html "trait std::default::Default") for [Box](../../std/boxed/struct.Box.html "struct std::boxed::Box")<[OsStr](../../std/ffi/struct.OsStr.html "struct std::ffi::OsStr")>
1.17.0
impl<R: [Read](../../std/io/trait.Read.html "trait std::io::Read") + ?[Sized](../../std/marker/trait.Sized.html "trait std:📑:Sized")> [Read](../../std/io/trait.Read.html "trait std::io::Read") for [Box](../../std/boxed/struct.Box.html "struct std::boxed::Box")<R>
[src]
fn [read](../../std/io/trait.Read.html#tymethod.read)(&mut self, buf: [&mut [](../primitive.slice.html)[u8](../primitive.u8.html)[]](../primitive.slice.html)) -> [Result](../../std/io/type.Result.html "type std::io::Result")<[usize](../primitive.usize.html)>
[src]
Pull some bytes from this source into the specified buffer, returning how many bytes were read. Read more
unsafe fn [initializer](../../std/io/trait.Read.html#method.initializer)(&self) -> [Initializer](../../std/io/struct.Initializer.html "struct std::io::Initializer")
[src]
🔬 This is a nightly-only experimental API. (read_initializer
#42788)
Determines if this Read
er can work with buffers of uninitialized memory. Read more
fn [read_to_end](../../std/io/trait.Read.html#method.read%5Fto%5Fend)(&mut self, buf: &mut [Vec](../../std/vec/struct.Vec.html "struct std::vec::Vec")<[u8](../primitive.u8.html)>) -> [Result](../../std/io/type.Result.html "type std::io::Result")<[usize](../primitive.usize.html)>
[src]
Read all bytes until EOF in this source, placing them into buf
. Read more
fn [read_to_string](../../std/io/trait.Read.html#method.read%5Fto%5Fstring)(&mut self, buf: &mut [String](../../std/string/struct.String.html "struct std:🧵:String")) -> [Result](../../std/io/type.Result.html "type std::io::Result")<[usize](../primitive.usize.html)>
[src]
Read all bytes until EOF in this source, appending them to buf
. Read more
fn [read_exact](../../std/io/trait.Read.html#method.read%5Fexact)(&mut self, buf: [&mut [](../primitive.slice.html)[u8](../primitive.u8.html)[]](../primitive.slice.html)) -> [Result](../../std/io/type.Result.html "type std::io::Result")<[()](../primitive.unit.html)>
[src]
Read the exact number of bytes required to fill buf
. Read more
`fn by_ref(&mut self) -> &mut Self where
Creates a "by reference" adaptor for this instance of Read
. Read more
ⓘImportant traits for Bytes
fn [bytes](../../std/io/trait.Read.html#method.bytes)(self) -> [Bytes](../../std/io/struct.Bytes.html "struct std::io::Bytes")<Self> where Self: [Sized](../../std/marker/trait.Sized.html "trait std:📑:Sized"),
[src]
Transforms this Read
instance to an [Iterator
] over its bytes. Read more
ⓘImportant traits for Chars
fn [chars](../../std/io/trait.Read.html#method.chars)(self) -> [Chars](../../std/io/struct.Chars.html "struct std::io::Chars")<Self> where Self: [Sized](../../std/marker/trait.Sized.html "trait std:📑:Sized"),
[src]
🔬 This is a nightly-only experimental API. (io
#27802)
the semantics of a partial read/write of where errors happen is currently unclear and may change
Transforms this Read
instance to an [Iterator
] over [char
]s. Read more
ⓘImportant traits for Chain<T, U>
fn [chain](../../std/io/trait.Read.html#method.chain)<R: [Read](../../std/io/trait.Read.html "trait std::io::Read")>(self, next: R) -> [Chain](../../std/io/struct.Chain.html "struct std::io::Chain")<Self, R> where Self: [Sized](../../std/marker/trait.Sized.html "trait std:📑:Sized"),
[src]
Creates an adaptor which will chain this stream with another. Read more
ⓘImportant traits for Take
fn [take](../../std/io/trait.Read.html#method.take)(self, limit: [u64](../primitive.u64.html)) -> [Take](../../std/io/struct.Take.html "struct std::io::Take")<Self> where Self: [Sized](../../std/marker/trait.Sized.html "trait std:📑:Sized"),
[src]
Creates an adaptor which will read at most limit
bytes from it. Read more
impl<W: [Write](../../std/io/trait.Write.html "trait std::io::Write") + ?[Sized](../../std/marker/trait.Sized.html "trait std:📑:Sized")> [Write](../../std/io/trait.Write.html "trait std::io::Write") for [Box](../../std/boxed/struct.Box.html "struct std::boxed::Box")<W>
[src]
impl<S: [Seek](../../std/io/trait.Seek.html "trait std::io::Seek") + ?[Sized](../../std/marker/trait.Sized.html "trait std:📑:Sized")> [Seek](../../std/io/trait.Seek.html "trait std::io::Seek") for [Box](../../std/boxed/struct.Box.html "struct std::boxed::Box")<S>
[src]
impl<B: [BufRead](../../std/io/trait.BufRead.html "trait std::io::BufRead") + ?[Sized](../../std/marker/trait.Sized.html "trait std:📑:Sized")> [BufRead](../../std/io/trait.BufRead.html "trait std::io::BufRead") for [Box](../../std/boxed/struct.Box.html "struct std::boxed::Box")<B>
[src]
fn [fill_buf](../../std/io/trait.BufRead.html#tymethod.fill%5Fbuf)(&mut self) -> [Result](../../std/io/type.Result.html "type std::io::Result")<[&[](../primitive.slice.html)[u8](../primitive.u8.html)[]](../primitive.slice.html)>
[src]
Fills the internal buffer of this object, returning the buffer contents. Read more
fn [consume](../../std/io/trait.BufRead.html#tymethod.consume)(&mut self, amt: [usize](../primitive.usize.html))
[src]
Tells this buffer that amt
bytes have been consumed from the buffer, so they should no longer be returned in calls to read
. Read more
fn [read_until](../../std/io/trait.BufRead.html#method.read%5Funtil)(&mut self, byte: [u8](../primitive.u8.html), buf: &mut [Vec](../../std/vec/struct.Vec.html "struct std::vec::Vec")<[u8](../primitive.u8.html)>) -> [Result](../../std/io/type.Result.html "type std::io::Result")<[usize](../primitive.usize.html)>
[src]
Read all bytes into buf
until the delimiter byte
or EOF is reached. Read more
fn [read_line](../../std/io/trait.BufRead.html#method.read%5Fline)(&mut self, buf: &mut [String](../../std/string/struct.String.html "struct std:🧵:String")) -> [Result](../../std/io/type.Result.html "type std::io::Result")<[usize](../primitive.usize.html)>
[src]
Read all bytes until a newline (the 0xA byte) is reached, and append them to the provided buffer. Read more
ⓘImportant traits for Split
fn [split](../../std/io/trait.BufRead.html#method.split)(self, byte: [u8](../primitive.u8.html)) -> [Split](../../std/io/struct.Split.html "struct std::io::Split")<Self> where Self: [Sized](../../std/marker/trait.Sized.html "trait std:📑:Sized"),
[src]
Returns an iterator over the contents of this reader split on the byte byte
. Read more
ⓘImportant traits for Lines
fn [lines](../../std/io/trait.BufRead.html#method.lines)(self) -> [Lines](../../std/io/struct.Lines.html "struct std::io::Lines")<Self> where Self: [Sized](../../std/marker/trait.Sized.html "trait std:📑:Sized"),
[src]
Returns an iterator over the lines of this reader. Read more
impl<'a> [From](../../std/convert/trait.From.html "trait std::convert::From")<&'a [Path](../../std/path/struct.Path.html "struct std::path::Path")> for [Box](../../std/boxed/struct.Box.html "struct std::boxed::Box")<[Path](../../std/path/struct.Path.html "struct std::path::Path")>
1.17.0
impl [From](../../std/convert/trait.From.html "trait std::convert::From")<[Box](../../std/boxed/struct.Box.html "struct std::boxed::Box")<[Path](../../std/path/struct.Path.html "struct std::path::Path")>> for [PathBuf](../../std/path/struct.PathBuf.html "struct std::path::PathBuf")
1.18.0
impl [From](../../std/convert/trait.From.html "trait std::convert::From")<[PathBuf](../../std/path/struct.PathBuf.html "struct std::path::PathBuf")> for [Box](../../std/boxed/struct.Box.html "struct std::boxed::Box")<[Path](../../std/path/struct.Path.html "struct std::path::Path")>
1.20.0