pub trait InputStreamwhere
for<'a> Self: StreamIsPartial + Stream + Compare<char> + AsRef<[u8]> + Compare<Caseless<&'a str>> + Compare<&'a str>,{
type Str: Clone + AsRef<str> + Into<String> + Into<Box<str>>;
// Required methods
fn try_into_str(
slice: &Self::Slice,
) -> Result<Self::Str, CalendarParseError<Self::Slice>>;
fn try_into_string(
slice: &Self::Slice,
) -> Result<String, CalendarParseError<Self::Slice>>;
fn as_bytes(slice: &Self::Slice) -> &[u8] ⓘ;
fn str_from_static_str(s: &'static str) -> Self::Str;
fn strip_line_fold_prefix(&mut self) -> usize;
fn next_contiguous_slice<E>(input: &mut Self) -> Result<Self::Slice, E>
where E: ParserError<Self>;
}Expand description
An input stream compatible with the parsers in calico::parser.
Required Associated Types§
Required Methods§
fn try_into_str( slice: &Self::Slice, ) -> Result<Self::Str, CalendarParseError<Self::Slice>>
fn try_into_string( slice: &Self::Slice, ) -> Result<String, CalendarParseError<Self::Slice>>
fn as_bytes(slice: &Self::Slice) -> &[u8] ⓘ
fn str_from_static_str(s: &'static str) -> Self::Str
Sourcefn strip_line_fold_prefix(&mut self) -> usize
fn strip_line_fold_prefix(&mut self) -> usize
Removes as many line folds from the prefix of self as possible, and returns the number of
bytes removed (this will always be a multiple of three).
Sourcefn next_contiguous_slice<E>(input: &mut Self) -> Result<Self::Slice, E>where
E: ParserError<Self>,
fn next_contiguous_slice<E>(input: &mut Self) -> Result<Self::Slice, E>where
E: ParserError<Self>,
Returns the longest contiguous prefix of self. A slice is contiguous if it does not
contain line folds or newlines. If the input does not contain the sequence \r\n anywhere,
the entire input is returned as a slice.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".