pub struct TypeScriptCodegen;Expand description
TypeScript e2e code generator.
Trait Implementations§
Source§impl E2eCodegen for TypeScriptCodegen
impl E2eCodegen for TypeScriptCodegen
Source§fn generate(
&self,
groups: &[FixtureGroup],
e2e_config: &E2eConfig,
config: &ResolvedCrateConfig,
type_defs: &[TypeDef],
enums: &[EnumDef],
functions: &[FunctionDef],
errors: &[ErrorDef],
) -> Result<Vec<GeneratedFile>>
fn generate( &self, groups: &[FixtureGroup], e2e_config: &E2eConfig, config: &ResolvedCrateConfig, type_defs: &[TypeDef], enums: &[EnumDef], functions: &[FunctionDef], errors: &[ErrorDef], ) -> Result<Vec<GeneratedFile>>
Generate all e2e test project files for this language. Read more
Source§fn render_snippet_body(
&self,
fixture: &Fixture,
e2e_config: &E2eConfig,
config: &ResolvedCrateConfig,
type_defs: &[TypeDef],
enums: &[EnumDef],
) -> Result<String>
fn render_snippet_body( &self, fixture: &Fixture, e2e_config: &E2eConfig, config: &ResolvedCrateConfig, type_defs: &[TypeDef], enums: &[EnumDef], ) -> Result<String>
Render the target-language source inside a generated documentation snippet.
Source§fn render_snippet_body_with_functions(
&self,
fixture: &Fixture,
e2e_config: &E2eConfig,
config: &ResolvedCrateConfig,
type_defs: &[TypeDef],
enums: &[EnumDef],
functions: &[FunctionDef],
_errors: &[ErrorDef],
) -> Result<String>
fn render_snippet_body_with_functions( &self, fixture: &Fixture, e2e_config: &E2eConfig, config: &ResolvedCrateConfig, type_defs: &[TypeDef], enums: &[EnumDef], functions: &[FunctionDef], _errors: &[ErrorDef], ) -> Result<String>
~keep
errors is ApiSurface::errors. A snippet renderer needs it to name the exception
class a specific error variant maps to (see [snippet_error_branch]). Read moreSource§fn language_name(&self) -> &'static str
fn language_name(&self) -> &'static str
Language name for display and directory naming.
Source§fn supported_assertion_types(&self) -> Vec<&'static str>
fn supported_assertion_types(&self) -> Vec<&'static str>
The assertion
type values this backend can render. Read moreSource§fn generate_gated(
&self,
groups: &[FixtureGroup],
e2e_config: &E2eConfig,
config: &ResolvedCrateConfig,
type_defs: &[TypeDef],
enums: &[EnumDef],
functions: &[FunctionDef],
errors: &[ErrorDef],
) -> Result<Vec<GeneratedFile>>
fn generate_gated( &self, groups: &[FixtureGroup], e2e_config: &E2eConfig, config: &ResolvedCrateConfig, type_defs: &[TypeDef], enums: &[EnumDef], functions: &[FunctionDef], errors: &[ErrorDef], ) -> Result<Vec<GeneratedFile>>
Run the shared fixture gates, then this backend’s
Self::generate. Read moreAuto Trait Implementations§
impl Freeze for TypeScriptCodegen
impl RefUnwindSafe for TypeScriptCodegen
impl Send for TypeScriptCodegen
impl Sync for TypeScriptCodegen
impl Unpin for TypeScriptCodegen
impl UnsafeUnpin for TypeScriptCodegen
impl UnwindSafe for TypeScriptCodegen
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
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> ⓘ
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