pub struct ComponentEmit {
pub name: String,
pub span_start: u32,
pub used: bool,
}Expand description
A Vue <script setup> defineEmits declared event, harvested from the type
tuple-call form (defineEmits<{ (e: 'foo'): void }>()), the type object form
(defineEmits<{ foo: [x: string] }>()), or the runtime array form
(defineEmits(['foo'])). used is set during extraction when the bound emit
name is called as emit('<name>'). The unused-component-emit detector flags
an event where used is false. See harvest_define_emits in sfc_props.rs.
Fields§
§name: StringThe declared emit event name.
span_start: u32Start byte offset of the emit declaration (anchors the finding).
used: boolWhether this event is emitted via emit('<name>') somewhere in the
component’s <script>.
Trait Implementations§
Source§impl Clone for ComponentEmit
impl Clone for ComponentEmit
Source§impl Debug for ComponentEmit
impl Debug for ComponentEmit
impl<'__de> Decode<'__de> for ComponentEmitwhere
'__de:,
impl Encode for ComponentEmit
impl Eq for ComponentEmit
Source§impl PartialEq for ComponentEmit
impl PartialEq for ComponentEmit
impl StructuralPartialEq for ComponentEmit
Auto Trait Implementations§
impl Freeze for ComponentEmit
impl RefUnwindSafe for ComponentEmit
impl Send for ComponentEmit
impl Sync for ComponentEmit
impl Unpin for ComponentEmit
impl UnsafeUnpin for ComponentEmit
impl UnwindSafe for ComponentEmit
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DecodeOwned for Twhere
T: for<'de> Decode<'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
Compare self to
key and return true if they are equal.