pub struct V1File<'a> { /* private fields */ }Expand description
A validated v1 payload file entry.
Implementations§
Source§impl<'a> V1File<'a>
impl<'a> V1File<'a>
Sourcepub fn path_components(&self) -> &[&'a [u8]]
pub fn path_components(&self) -> &[&'a [u8]]
Returns raw torrent path components.
Sourcepub fn path_utf8(&self) -> Option<Vec<&'a str>>
pub fn path_utf8(&self) -> Option<Vec<&'a str>>
Returns UTF-8 path components when all raw components are valid UTF-8.
Sourcepub const fn attributes(&self) -> &'a [u8] ⓘ
pub const fn attributes(&self) -> &'a [u8] ⓘ
Returns BEP 47 file attribute bytes.
Sourcepub fn is_padding(&self) -> bool
pub fn is_padding(&self) -> bool
Returns whether this entry is a validated hybrid alignment padding file.
Trait Implementations§
Auto Trait Implementations§
impl<'a> Freeze for V1File<'a>
impl<'a> RefUnwindSafe for V1File<'a>
impl<'a> Send for V1File<'a>
impl<'a> Sync for V1File<'a>
impl<'a> Unpin for V1File<'a>
impl<'a> UnwindSafe for V1File<'a>
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