pub fn reset(&mut self) {
        self.builder = RequestBuilder::new();
        self.content_length = ContentLength::default();
        self.state = DecodeState::Method;
    }
/// Resets the decoder state back to its default state.
///
/// # Examples
///
/// ```
/// # extern crate bytes;
/// # extern crate rtsp;
/// #
/// use bytes::BytesMut;
///
/// use rtsp::header::name::HeaderName;
/// use rtsp::header::value::HeaderValue;
/// use rtsp::method::Method;
/// use rtsp::protocol::codec::decoder::request::{
///     DecodeError, DecodeState, Decoder,
/// };
/// use rtsp::request::Request;
/// use rtsp::uri::PathError;
/// use rtsp::uri::request::{URI, URIError};
///
/// # fn main() {
/// let buffer = "Bad Request!\r\nExtra garbage data";
/// let mut decoder = Decoder::new();
///
/// let (result, _) = decoder.decode(buffer);
/// assert_eq!(
///     decoder.state(),
///     DecodeState::Error(DecodeError::URI(URIError::Path(PathError::InvalidCharacter)))
/// );
/// assert!(result.is_error());
///
/// decoder.reset();
///
/// assert_eq!(decoder.state(), DecodeState::Method);
/// # }
/// ```
Resets the decoder state back to its default state.
Resets the decoder state back to its default state .
pub fn reset(&mut self) {
        self.builder = RequestBuilder::new();
        self.content_length = ContentLength::default();
        self.state = DecodeState::Method;
    }
pub fn reset ( & mut self ) { self . builder = RequestBuilder :: new ( ) ; self . content_length = ContentLength :: default ( ) ; self . state = DecodeState :: Method ; }
Resets the decoder state back to its default state.
Resets the decoder state back to its default state .
&mut self
&mut self
examples
None
extern crate bytes;
None
extern crate rtsp;
use bytes::BytesMut.

use rtsp::header::name::HeaderName;
use rtsp::header::value::HeaderValue;
use rtsp::method::Method;
use rtsp::protocol::codec::decoder::request::{
DecodeError, DecodeState, Decoder,
};
use rtsp::request::Request;
use rtsp::uri::PathError;
use rtsp::uri::request::{URI, URIError}.
use bytes :: BytesMut . use rtsp :: header :: name :: HeaderName ; use rtsp :: header :: value :: HeaderValue ; use rtsp :: method :: Method ; use rtsp :: protocol :: codec :: decoder :: request :: { DecodeError DecodeState Decoder } ; use rtsp :: request :: Request ; use rtsp :: uri :: PathError ; use rtsp :: uri :: request :: { URI URIError } .
fn main() {
let buffer = "Bad Request!\r\nExtra garbage data";
let mut decoder = Decoder::new().

let (result, _) = decoder.decode(buffer);
assert_eq!(
decoder.state(),
DecodeState::Error(DecodeError::URI(URIError::Path(PathError::InvalidCharacter)))
);
assert!(result.is_error()).

decoder.reset().

assert_eq!(decoder.state(), DecodeState::Method).
let buffer = " Bad Request! \ r \ nExtra garbage data " ; let mut decoder = Decoder :: new () . let ( result _ ) = decoder . decode ( buffer ) ; assert_eq! ( decoder . state () DecodeState :: Error ( DecodeError :: URI ( URIError :: Path ( PathError :: InvalidCharacter ))) ) ; assert! ( result . is_error () ) . decoder . reset () . assert_eq! ( decoder . state () DecodeState :: Method ) .
}
None