[−][src]Enum torro::bencode::Bencode
A found bencode object whilst parsing, only one is returned from parse due to the bencode spec
Variants
Lexographically-ordered
dictionary from d3:keyi6e9:other key12:second valuee
.
The first value is equivilant to a Bencode::ByteString and second is a recursive Bencode block
Variable-sized array (list) of further Bencodes from l4:this2:is1:a4:liste
A bytestring containing multiple bytes from 11:string here
Int(i64)
Parsed integer from a direct i0e
Implementations
impl Bencode
[src]
pub fn dict(self) -> Option<BTreeMap<Vec<u8>, Bencode>>
[src]
Bencode::Dict exposing method
pub fn list(self) -> Option<Vec<Bencode>>
[src]
Bencode::List exposing method
pub fn bytestring(self) -> Option<Vec<u8>>
[src]
Bencode::ByteString exposing method
pub fn int(self) -> Option<i64>
[src]
Bencode::Int exposing method
Trait Implementations
impl Clone for Bencode
[src]
impl Debug for Bencode
[src]
impl PartialEq<Bencode> for Bencode
[src]
impl StructuralPartialEq for Bencode
[src]
Auto Trait Implementations
impl RefUnwindSafe for Bencode
impl Send for Bencode
impl Sync for Bencode
impl Unpin for Bencode
impl UnwindSafe for Bencode
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>,