SourceStream
types that use the std
library, including heap allocation.
CharIterSourceStream | A generic SourceStream implementation for any Iterator of char s and
that provides the position of each char relative to the start of the
iteration. The various to_a?rc(_box)?_str(ing)? converter functions are
used with this.
|
StrishIterSourceStream | A generic SourceStream implementation for any Iterator of
shared-ownership (i.e. reference-counted) string-ish types and that provides
the position of each char relative to the start of the iteration.
|
to_arc_box_str | Use an Arc , for multi-threaded sharing, for the conversion with the same
trade-offs as to_rc_box_str .
|
to_arc_str | Use an Arc , for multi-threaded sharing, for the conversion with the same
trade-offs as to_rc_str .
|
to_arc_string | Use an Arc , for multi-threaded sharing, for the conversion with the same
trade-offs as to_rc_string .
|
to_rc_box_str | Converting a String to a boxed str slice gives the program a chance to
use minimal memory by freeing the String 's extra capacity.
|
to_rc_str | Converting a String to an Rc<str> slice (which is also "boxed",
i.e. heap-allocated) has the benefits of:
|
to_rc_string | Simply putting a String in an Rc has the benefit that no moving of the
string contents will ever occur, which is always very fast to construct.
|