Struct Entry

Source
pub struct Entry { /* private fields */ }
Expand description

An entry in an OLE file.

An entry means a stream or a storage. A stream is a file, and a storage is a folder.

§Basic Example

use ole::Reader;

let mut parser =
      Reader::from_path("assets/Thumbs.db").unwrap();

let entry = parser.iterate().next().unwrap();
println!("Name of the entry: {}", entry.name());
println!("Type of the entry: {}", entry._type());
println!("Size of the entry: {}", entry.len());

Implementations§

Source§

impl Entry

Source

pub fn id(&self) -> u32

Returns the ID of the entry.

Source

pub fn creation_time(&self) -> u64

Returns the creation time of the entry (could be 0)

Source

pub fn last_modification_time(&self) -> u64

Returns the last modification time of the entry (could be 0)

Source

pub fn name(&self) -> &str

Returns the name of the entry.

Source

pub fn _type(&self) -> EntryType

Returns the type of the entry.

Source

pub fn len(&self) -> usize

Returns the size of the entry

Source

pub fn left_child_node(&self) -> u32

Returns the DirID of the left child node

Source

pub fn right_child_node(&self) -> u32

Returns the DirID of the right child node

Source

pub fn parent_node(&self) -> Option<u32>

Returns the DirID of the parent, if exists

Source

pub fn children_nodes(&self) -> &Vec<u32>

Returns the DirIDs of the children, if exists

Trait Implementations§

Source§

impl Debug for Entry

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Display for Entry

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

§

impl Freeze for Entry

§

impl RefUnwindSafe for Entry

§

impl Send for Entry

§

impl Sync for Entry

§

impl Unpin for Entry

§

impl UnwindSafe for Entry

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToString for T
where T: Display + ?Sized,

Source§

fn to_string(&self) -> String

Converts the given value to a String. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.