Skip to main content

Crate use_astro

Crate use_astro 

Source
Expand description

§use-astro

Astro framework metadata primitives for RustUse.

§Experimental

use-astro is experimental while use-js remains below 0.3.0.

§Example

use use_astro::{AstroConfigFile, AstroIntegrationName, AstroRenderingMode};

let integration = AstroIntegrationName::new("@astrojs/mdx")?;

assert_eq!(integration.as_str(), "@astrojs/mdx");
assert_eq!(AstroRenderingMode::Hybrid.as_str(), "hybrid");
assert_eq!(AstroConfigFile::AstroConfigTs.as_str(), "astro.config.ts");

§Scope

  • Astro version-family, file-kind, directory-kind, rendering-mode, and config-file labels.
  • Lightweight integration and content collection name validation.

§Non-goals

  • Astro runtime behavior.
  • MDX parsing.
  • Content collections or routing semantics.
  • Build or adapter behavior.

§License

Licensed under either Apache-2.0 or MIT.

Structs§

AstroContentCollectionName
Validated Astro content collection name metadata.
AstroIntegrationName
Validated Astro integration name metadata.

Enums§

AstroConfigFile
Common Astro config file labels.
AstroDirectoryKind
Astro directory labels.
AstroFileKind
Astro file-kind labels.
AstroRenderingMode
Astro rendering mode labels.
AstroTextError
Error returned when Astro metadata text is invalid.
AstroVersionFamily
Astro version-family labels.