[−][src]Struct ovba::Project
Represents a VBA project.
This type serves as the entry point into this crate's functionality and exposes the public API surface.
Fields
information: Information
Specifies version-independent information for the VBA project.
references: Vec<Reference>
Specifies the external references of the VBA project.
modules: Vec<Module>
Specifies the modules in the project.
Implementations
impl Project
[src]
pub fn list(&self) -> Result<Vec<(String, String)>>
[src]
Returns a list of entries (storages and streams) in the raw binary data. Each
entry is represented as a tuple of two String
s, where the first element
contains the entry's name and the second element the entry's path inside the
CFB.
The raw binary data is encoded as a Compound File Binary
pub fn read_stream<P>(&self, stream_path: P) -> Result<Vec<u8>> where
P: AsRef<Path>,
[src]
P: AsRef<Path>,
Returns a stream's contents.
This is a convenience function operating on the CFB data.
pub fn decompress_stream_from<P>(
&self,
stream_path: P,
offset: usize
) -> Result<Vec<u8>> where
P: AsRef<Path>,
[src]
&self,
stream_path: P,
offset: usize
) -> Result<Vec<u8>> where
P: AsRef<Path>,
Returns a stream's decompressed data.
This function reads a stream referenced by stream_path
and passes the data
starting at offset
into the RLE decompressor.
The primary use case for this function is to extract source code from VBA
Module
s. The respective offset
is reported by Module::text_offset
.
Auto Trait Implementations
impl !RefUnwindSafe for Project
impl Send for Project
impl !Sync for Project
impl Unpin for Project
impl UnwindSafe for Project
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,
pub 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, 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.
pub 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>,