Struct proguard::ProguardMapping[][src]

pub struct ProguardMapping<'s> { /* fields omitted */ }

A Proguard Mapping file.

Implementations

impl<'s> ProguardMapping<'s>[src]

pub fn new(source: &'s [u8]) -> Self[src]

Create a new Proguard Mapping.

pub fn is_valid(&self) -> bool[src]

Whether the mapping file is indeed valid.

Examples

use proguard::ProguardMapping;

let valid = ProguardMapping::new(b"a -> b:\n    void method() -> b");
assert_eq!(valid.is_valid(), true);

let invalid = ProguardMapping::new(
    br#"
a -> proguard:
  mapping but(is) -> not
"#,
);
assert_eq!(invalid.is_valid(), false);

pub fn summary(&self) -> MappingSummary<'_>[src]

Returns a summary of the file.

pub fn has_line_info(&self) -> bool[src]

Whether the mapping file contains line info.

Examples

use proguard::ProguardMapping;

let with = ProguardMapping::new(b"a -> b:\n    1:1:void method() -> a");
assert_eq!(with.has_line_info(), true);

let without = ProguardMapping::new(b"a -> b:\n    void method() -> b");
assert_eq!(without.has_line_info(), false);

pub fn iter(&self) -> ProguardRecordIter<'s>

Notable traits for ProguardRecordIter<'s>

impl<'s> Iterator for ProguardRecordIter<'s> type Item = Result<ProguardRecord<'s>, ParseError<'s>>;
[src]

Create an Iterator over ProguardRecords.

Trait Implementations

impl<'s> Clone for ProguardMapping<'s>[src]

impl<'s> Debug for ProguardMapping<'s>[src]

impl<'s> Default for ProguardMapping<'s>[src]

Auto Trait Implementations

impl<'s> RefUnwindSafe for ProguardMapping<'s>

impl<'s> Send for ProguardMapping<'s>

impl<'s> Sync for ProguardMapping<'s>

impl<'s> Unpin for ProguardMapping<'s>

impl<'s> UnwindSafe for ProguardMapping<'s>

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.