Skip to main content

ManifestChunk

Struct ManifestChunk 

Source
pub struct ManifestChunk<S = String, Vs = Vec<S>, Vu8 = Vec<u8>> {
Show 13 fields pub key: S, pub contents: Vu8, pub hash: S, pub mime_type: S, pub src: Option<S>, pub file: S, pub css: Vs, pub assets: Vs, pub is_entry: bool, pub name: Option<S>, pub is_dynamic_entry: bool, pub imports: Vs, pub dynamic_imports: Vs,
}
Expand description

Vite manifest chunk.

Where possible, use StaticManifestChunk and DynamicManifestChunk instead.

See Vite documentation

§Generics

  • Generic S can be used to change type of strings in struct.
  • Generic Vs can be used to change type of array of strings.
  • Generic Vu8 can be used to change type of byte arrays (f.e. Vec<u8> or &[u8]).

Fields§

§key: S

The key of this chunk in manifest.

This field is added by vite-static and skipped during (de)serialization.

§contents: Vu8

The contents of manifest chunk.

This field is added by vite-static and skipped during (de)serialization.

§hash: S

Hash of this chunk. Derive macro uses BLAKE3 as hashing algorithm.

This field is added by vite-static and skipped during (de)serialization.

§mime_type: S

Mime type of this chunk.

This field is added by vite-static and skipped during (de)serialization.

§src: Option<S>

The input file name of this chunk/asset if known.

§file: S

The output file name of this chunk/asset.

§css: Vs

The list of CSS files imported by this chunk.

§assets: Vs

The list of asset files imported by this chunk, excluding CSS files.

§is_entry: bool

Whether this chunk or asset is an entry point

§name: Option<S>

The name of this chunk/asset if known.

§is_dynamic_entry: bool

Whether this chunk is a dynamic entry point

This field is only present in JS chunks.

§imports: Vs

The list of statically imported chunks by this chunk

The values are the keys of the manifest. This field is only present in JS chunks.

§dynamic_imports: Vs

The list of dynamically imported chunks by this chunk

The values are the keys of the manifest. This field is only present in JS chunks.

Trait Implementations§

Source§

impl<S, Vs, Vu8> Clone for ManifestChunk<S, Vs, Vu8>
where S: Clone, Vs: Clone, Vu8: Clone,

Source§

fn clone(&self) -> ManifestChunk<S, Vs, Vu8>

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl<S, Vs, Vu8> Copy for ManifestChunk<S, Vs, Vu8>
where S: Copy, Vs: Copy, Vu8: Copy,

Source§

impl<S, Vs, Vu8> Debug for ManifestChunk<S, Vs, Vu8>
where S: Debug, Vs: Debug, Vu8: Debug,

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
Source§

impl<S, Vs, Vu8> Default for ManifestChunk<S, Vs, Vu8>
where S: Default, Vs: Default, Vu8: Default,

Source§

fn default() -> ManifestChunk<S, Vs, Vu8>

Returns the “default value” for a type. Read more
Source§

impl<'de, S, Vs, Vu8> Deserialize<'de> for ManifestChunk<S, Vs, Vu8>
where S: Deserialize<'de> + Default, Vs: Deserialize<'de> + Default, Vu8: Default,

Source§

fn deserialize<__D>( __deserializer: __D, ) -> Result<ManifestChunk<S, Vs, Vu8>, <__D as Deserializer<'de>>::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl<S, Vs, Vu8> Eq for ManifestChunk<S, Vs, Vu8>
where S: Eq, Vs: Eq, Vu8: Eq,

Source§

impl<S, Vs, Vu8> Hash for ManifestChunk<S, Vs, Vu8>
where S: Hash, Vs: Hash, Vu8: Hash,

Source§

fn hash<__H>(&self, state: &mut __H)
where __H: Hasher,

Feeds this value into the given Hasher. Read more
1.3.0 · Source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where H: Hasher, Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
Source§

impl<S, Vs, Vu8> PartialEq for ManifestChunk<S, Vs, Vu8>
where S: PartialEq, Vs: PartialEq, Vu8: PartialEq,

Source§

fn eq(&self, other: &ManifestChunk<S, Vs, Vu8>) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl<S, Vs, Vu8> Serialize for ManifestChunk<S, Vs, Vu8>
where S: Serialize, Vs: Serialize,

Source§

fn serialize<__S>( &self, __serializer: __S, ) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
Source§

impl<S, Vs, Vu8> StructuralPartialEq for ManifestChunk<S, Vs, Vu8>
where S: PartialEq, Vs: PartialEq, Vu8: PartialEq,

Auto Trait Implementations§

§

impl<S, Vs, Vu8> Freeze for ManifestChunk<S, Vs, Vu8>
where S: Freeze, Vu8: Freeze, Vs: Freeze,

§

impl<S, Vs, Vu8> RefUnwindSafe for ManifestChunk<S, Vs, Vu8>

§

impl<S, Vs, Vu8> Send for ManifestChunk<S, Vs, Vu8>
where S: Send, Vu8: Send, Vs: Send,

§

impl<S, Vs, Vu8> Sync for ManifestChunk<S, Vs, Vu8>
where S: Sync, Vu8: Sync, Vs: Sync,

§

impl<S, Vs, Vu8> Unpin for ManifestChunk<S, Vs, Vu8>
where S: Unpin, Vu8: Unpin, Vs: Unpin,

§

impl<S, Vs, Vu8> UnsafeUnpin for ManifestChunk<S, Vs, Vu8>
where S: UnsafeUnpin, Vu8: UnsafeUnpin, Vs: UnsafeUnpin,

§

impl<S, Vs, Vu8> UnwindSafe for ManifestChunk<S, Vs, Vu8>
where S: UnwindSafe, Vu8: UnwindSafe, Vs: UnwindSafe,

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more