[−][src]Enum ipfs_unixfs::file::reader::FileContent
Files in unixfs merkle trees can either contain content of the file, or can contain links to other parts of the tree.
Variants
When reaching the leaf level of a DAG we finally find the actual content. For empty files without content this will be an empty slice.
The content of the file is spread over a number of blocks; iteration must follow from index depth-first from the first link to reach the given the bytes in the given byte offset range.
Implementations
impl<'a, I> FileContent<'a, I> where
I: Iterator<Item = (PBLink<'a>, Range<u64>)>,
[src]
I: Iterator<Item = (PBLink<'a>, Range<u64>)>,
pub fn unwrap_content(self) -> &'a [u8]
[src]
Returns the content as bytes, or panics if there were links instead.
Trait Implementations
Auto Trait Implementations
impl<'a, I> RefUnwindSafe for FileContent<'a, I> where
I: RefUnwindSafe,
I: RefUnwindSafe,
impl<'a, I> Send for FileContent<'a, I> where
I: Send,
I: Send,
impl<'a, I> Sync for FileContent<'a, I> where
I: Sync,
I: Sync,
impl<'a, I> Unpin for FileContent<'a, I> where
I: Unpin,
I: Unpin,
impl<'a, I> UnwindSafe for FileContent<'a, I> where
I: UnwindSafe,
I: UnwindSafe,
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> Same<T> for T
type Output = T
Should always be Self
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>,