pub struct TorrentFile { /* private fields */ }Expand description
Owned payload file entry exposed by the inspection API.
Implementations§
Source§impl TorrentFile
impl TorrentFile
Sourcepub fn path_components(&self) -> &[Vec<u8>]
pub fn path_components(&self) -> &[Vec<u8>]
Returns raw torrent path components.
Sourcepub fn torrent_path(&self) -> TorrentPath
pub fn torrent_path(&self) -> TorrentPath
Returns an owned raw-identity torrent path value.
Sourcepub fn path_utf8(&self) -> Option<Vec<&str>>
pub fn path_utf8(&self) -> Option<Vec<&str>>
Returns UTF-8 path components when every component is valid UTF-8.
Sourcepub fn attributes(&self) -> &[u8] ⓘ
pub fn attributes(&self) -> &[u8] ⓘ
Returns file attribute bytes.
Sourcepub fn is_padding(&self) -> bool
pub fn is_padding(&self) -> bool
Returns whether this owned entry represents validated hybrid padding.
Sourcepub const fn pieces_root(&self) -> Option<&[u8; 32]>
pub const fn pieces_root(&self) -> Option<&[u8; 32]>
Returns the v2 pieces root when applicable.
Trait Implementations§
Source§impl Clone for TorrentFile
impl Clone for TorrentFile
Source§fn clone(&self) -> TorrentFile
fn clone(&self) -> TorrentFile
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for TorrentFile
impl Debug for TorrentFile
Source§impl PartialEq for TorrentFile
impl PartialEq for TorrentFile
impl Eq for TorrentFile
impl StructuralPartialEq for TorrentFile
Auto Trait Implementations§
impl Freeze for TorrentFile
impl RefUnwindSafe for TorrentFile
impl Send for TorrentFile
impl Sync for TorrentFile
impl Unpin for TorrentFile
impl UnwindSafe for TorrentFile
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more