[][src]Struct dustr::Imports

pub struct Imports(_);

Imports helps manage imports (remove duplicates etc.)

A set of imports can be built from many other objects in dustr. You can get the imports list for a rust module, from a data structure, from a function, fields... All imports from all items in a library are then bubbled up to be used by the Library object, which will finally generate them.

The Imports structure ensures nothing is imported twice.

Implementations

impl Imports[src]

pub fn from_module(m: &Module, pkg: &str) -> Self[src]

Trait Implementations

impl Add<Imports> for Imports[src]

type Output = Self

The resulting type after applying the + operator.

impl Debug for Imports[src]

impl Display for Imports[src]

impl Sum<Imports> for Imports[src]

Auto Trait Implementations

impl RefUnwindSafe for Imports

impl Send for Imports

impl Sync for Imports

impl Unpin for Imports

impl UnwindSafe for Imports

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> ToString for T where
    T: Display + ?Sized
[src]

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.