pub struct FactoryReturnExport {
pub export_name: String,
pub class_local_name: String,
pub is_async: bool,
pub returns_array: bool,
}Expand description
An exported free-function factory proven to return one class instance, or one that declares an array of a class as its return type.
export function useApi() { return new RESTApi() } records
FactoryReturnExport { export_name: "useApi", class_local_name: "RESTApi" }.
The class_local_name is the factory module’s own LOCAL name, resolved at
analyze time through that module’s imports/exports to the real class export,
so a cross-module const x = useApi(); x.member consumer credits the class
across the boundary. See issue #1441 (Part A).
Fields§
§export_name: StringPublic export name (honors export { useApi as useRestApi }).
class_local_name: StringThe returned class’s local name within the factory module.
is_async: boolThe factory returns a promise of the class (an async function, or a
Promise<Class> return type). Only an awaited call result is the class.
returns_array: boolThe factory declares an array return type (make(): Sheet[]), so an
element of the call result is the class, not the result itself.
Trait Implementations§
Source§impl Clone for FactoryReturnExport
impl Clone for FactoryReturnExport
Source§fn clone(&self) -> FactoryReturnExport
fn clone(&self) -> FactoryReturnExport
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for FactoryReturnExport
impl Debug for FactoryReturnExport
impl<'__de> Decode<'__de> for FactoryReturnExport
Source§impl<'de> Deserialize<'de> for FactoryReturnExport
impl<'de> Deserialize<'de> for FactoryReturnExport
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<FactoryReturnExport, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<FactoryReturnExport, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
impl Encode for FactoryReturnExport
impl Eq for FactoryReturnExport
Source§impl PartialEq for FactoryReturnExport
impl PartialEq for FactoryReturnExport
Source§impl Serialize for FactoryReturnExport
impl Serialize for FactoryReturnExport
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
impl StructuralPartialEq for FactoryReturnExport
Auto Trait Implementations§
impl Forget for FactoryReturnExport
impl Freeze for FactoryReturnExport
impl Move for FactoryReturnExport
impl RefUnwindSafe for FactoryReturnExport
impl Send for FactoryReturnExport
impl Sync for FactoryReturnExport
impl Unpin for FactoryReturnExport
impl UnsafeUnpin for FactoryReturnExport
impl UnwindSafe for FactoryReturnExport
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DecodeOwned for Twhere
T: for<'de> Decode<'de>,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.impl<T> ErasedDestructor for Twhere
T: 'static,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
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> ⓘ
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> ⓘ
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