Hashless assets (#4312)
* add support for external assets * fix playwright tests * add more documentation to with_hash_suffix * restore external asset hashing tests * Update gtk workflow dependencies * fix doc test * multiple versions of libgtk * clear dx in playwright tests * fix fullstack caching test * try without apt cache * cache everything except libxdo-dev * revert ci changes * fix wasm asset options * fix merge conflict * recommend the used attribute instead * Move options to AssetOptionsBuilder * Don't deprecate non-canonical new asset options functions --------- Co-authored-by: Jonathan Kelley <jkelleyrtp@gmail.com>
This commit is contained in:
1 parent
0bd376b873
commit
e74c838441
22 files changed
+569
-316
No files matched your search
@@ -66,37 +66,6 @@ impl BundledAsset {
|
||||
}
|
||||
}
|
||||
|
||||
#[doc(hidden)]
|
||||
/// This should only be called from the macro
|
||||
/// Create a new asset but with a relative path
|
||||
///
|
||||
/// This method is deprecated and will be removed in a future release.
|
||||
#[deprecated(
|
||||
note = "Relative asset!() paths are not supported. Use a path like `/assets/myfile.png` instead of `./assets/myfile.png`"
|
||||
)]
|
||||
pub const fn new_relative(
|
||||
absolute_source_path: &'static str,
|
||||
bundled_path: &'static str,
|
||||
options: AssetOptions,
|
||||
) -> Self {
|
||||
Self::new(absolute_source_path, bundled_path, options)
|
||||
}
|
||||
|
||||
#[doc(hidden)]
|
||||
/// This should only be called from the macro
|
||||
/// Create a new asset from const paths
|
||||
pub const fn new_from_const(
|
||||
absolute_source_path: ConstStr,
|
||||
bundled_path: ConstStr,
|
||||
options: AssetOptions,
|
||||
) -> Self {
|
||||
Self {
|
||||
absolute_source_path,
|
||||
bundled_path,
|
||||
options,
|
||||
}
|
||||
}
|
||||
|
||||
/// Get the bundled name of the asset. This identifier cannot be used to read the asset directly
|
||||
pub fn bundled_path(&self) -> &str {
|
||||
self.bundled_path.as_str()
|
||||
|
||||
Reference in new issue
Block a user