pub struct Exports<'js>(/* private fields */);Expand description
A struct used for setting the value of previously declared exporsts of a module.
Implementations§
Source§impl<'js> Exports<'js>
impl<'js> Exports<'js>
Sourcepub fn export<N, T>(&self, name: N, value: T) -> Result<&Exports<'js>, Error>
pub fn export<N, T>(&self, name: N, value: T) -> Result<&Exports<'js>, Error>
Set the value of an exported entry.
Auto Trait Implementations§
impl<'js> !Send for Exports<'js>
impl<'js> !Sync for Exports<'js>
impl<'js> !UnwindSafe for Exports<'js>
impl<'js> Freeze for Exports<'js>
impl<'js> RefUnwindSafe for Exports<'js>
impl<'js> Unpin for Exports<'js>
impl<'js> UnsafeUnpin for Exports<'js>
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
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more