Skip to main content

Crate use_vue

Crate use_vue 

Source
Expand description

§use-vue

Vue component and directive metadata primitives for RustUse.

§Experimental

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

§Example

use use_vue::{VueApiStyle, VueComponentName, VueDirectiveName};

let component = VueComponentName::new("UserCard")?;
let directive = VueDirectiveName::new("v-focus")?;

assert_eq!(component.as_str(), "UserCard");
assert_eq!(directive.as_str(), "focus");
assert_eq!(VueApiStyle::ScriptSetup.as_str(), "script-setup");

§Scope

  • Vue component, directive, file-kind, and API-style labels.

§Non-goals

  • Vue compiler behavior.
  • SFC parsing.
  • Component rendering or project scaffolding.

§License

Licensed under either Apache-2.0 or MIT.

Structs§

VueComponentName
Validated Vue component name metadata.
VueDirectiveName
Validated Vue directive name metadata without the leading v-.

Enums§

VueApiStyle
Vue API style labels.
VueFileKind
Vue file-kind metadata.
VueNameError
Error returned when Vue name metadata is invalid.