[−][src]Enum torro::error::BencodeError
Error enum for errors during parsing. If a usize is given, it typically represents last parsed byte's posision
Variants
When the file ends prematurely without stopping
A character has been placed in an unexpected area, this occurs commonly with integers that have a misc character. The first item in tuple represents placement and second represents the unexpected byte
NoIntGiven(usize)
An integer block was left empty, e.g. ie
InvalidInt(usize)
Integer contains invalid (not 0-9) characters
NegativeZero(usize)
A i-0e
was given (negative zero) which is not allowed by the spec
LeadingZeros(usize)
Zeros where given before any significant number, e.g. i002e
No bencode data given
Bencode provided to bencode parser had multiple values given. Bencode is only allowed to have 1 toplevel value, if you'd like more, use a list or dict as the toplevel
Trait Implementations
impl Clone for BencodeError
[src]
fn clone(&self) -> BencodeError
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl Debug for BencodeError
[src]
impl From<BencodeError> for TorroError
[src]
fn from(error: BencodeError) -> Self
[src]
impl PartialEq<BencodeError> for BencodeError
[src]
fn eq(&self, other: &BencodeError) -> bool
[src]
fn ne(&self, other: &BencodeError) -> bool
[src]
impl StructuralPartialEq for BencodeError
[src]
Auto Trait Implementations
impl RefUnwindSafe for BencodeError
impl Send for BencodeError
impl Sync for BencodeError
impl Unpin for BencodeError
impl UnwindSafe for BencodeError
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,