pub struct ImportOptions { /* private fields */ }Expand description
Options controlling a single Namespace::import_from call.
Built fluently from ImportOptions::new; defaults to no rename and no
shadowing (an import over an existing binding is a conflict).
Implementations§
Source§impl ImportOptions
impl ImportOptions
Sourcepub fn rename(self, name: Symbol) -> Self
pub fn rename(self, name: Symbol) -> Self
Import the binding under name instead of its exported name.
Sourcepub fn allow_shadow(self) -> Self
pub fn allow_shadow(self) -> Self
Allow the import to overwrite an existing binding of the same name.
Trait Implementations§
Source§impl Clone for ImportOptions
impl Clone for ImportOptions
Source§fn clone(&self) -> ImportOptions
fn clone(&self) -> ImportOptions
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ImportOptions
impl Debug for ImportOptions
Source§impl Default for ImportOptions
impl Default for ImportOptions
Source§fn default() -> ImportOptions
fn default() -> ImportOptions
Returns the “default value” for a type. Read more
impl Eq for ImportOptions
Source§impl PartialEq for ImportOptions
impl PartialEq for ImportOptions
Source§fn eq(&self, other: &ImportOptions) -> bool
fn eq(&self, other: &ImportOptions) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for ImportOptions
Auto Trait Implementations§
impl Freeze for ImportOptions
impl RefUnwindSafe for ImportOptions
impl Send for ImportOptions
impl Sync for ImportOptions
impl Unpin for ImportOptions
impl UnsafeUnpin for ImportOptions
impl UnwindSafe for ImportOptions
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more