Enum ImportDeclaration

Source
pub enum ImportDeclaration<'a> {
    SimpleType(Cow<'a, str>),
    TypeOnDemand(Cow<'a, str>),
    SingleStatic(Cow<'a, str>),
    StaticOnDemand(Cow<'a, str>),
}
Expand description

ImportDeclaration 枚举表示Java中的导入声明。

Variants§

§

SimpleType(Cow<'a, str>)

单类型导入声明,参数是导入的类或接口的名称。

§

TypeOnDemand(Cow<'a, str>)

需求类型导入声明,参数是导入的包、类或接口的名称(路径)。

§

SingleStatic(Cow<'a, str>)

单静态导入声明,参数是导入的类或接口的名称 + 导入的静态成员的名称。

§

StaticOnDemand(Cow<'a, str>)

静态需求导入声明,参数是导入的类或接口的名称。

Trait Implementations§

Source§

impl<'a> Debug for ImportDeclaration<'a>

Source§

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

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

impl<'a> Display for ImportDeclaration<'a>

Source§

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

Formats the value using the given formatter. Read more

Auto Trait Implementations§

§

impl<'a> Freeze for ImportDeclaration<'a>

§

impl<'a> RefUnwindSafe for ImportDeclaration<'a>

§

impl<'a> Send for ImportDeclaration<'a>

§

impl<'a> Sync for ImportDeclaration<'a>

§

impl<'a> Unpin for ImportDeclaration<'a>

§

impl<'a> UnwindSafe for ImportDeclaration<'a>

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.