You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: crates/bevy_asset/src/io/source.rs
+19-22Lines changed: 19 additions & 22 deletions
Original file line number
Diff line number
Diff line change
@@ -11,10 +11,7 @@ use thiserror::Error;
11
11
12
12
usesuper::{ErasedAssetReader,ErasedAssetWriter};
13
13
14
-
#[allow(unused_imports, reason = "Needed for documentation links.")]
15
-
usecrate::io::{AssetReader,AssetWriter};
16
-
17
-
/// A reference to an "asset source", which maps to an [`AssetReader`] and/or [`AssetWriter`].
14
+
/// A reference to an "asset source", which maps to an [`AssetReader`](crate::io::AssetReader) and/or [`AssetWriter`](crate::io::AssetWriter).
18
15
///
19
16
/// * [`AssetSourceId::Default`] corresponds to "default asset paths" that don't specify a source: `/path/to/asset.png`
20
17
/// * [`AssetSourceId::Name`] corresponds to asset paths that _do_ specify a source: `remote://path/to/asset.png`, where `remote` is the name.
@@ -126,7 +123,7 @@ impl<'a> PartialEq for AssetSourceId<'a> {
126
123
}
127
124
}
128
125
129
-
/// Metadata about an "asset source", such as how to construct the [`AssetReader`] and [`AssetWriter`] for the source,
126
+
/// Metadata about an "asset source", such as how to construct the [`AssetReader`](crate::io::AssetReader) and [`AssetWriter`](crate::io::AssetWriter) for the source,
130
127
/// and whether or not the source is processed.
131
128
#[derive(Default)]
132
129
pubstructAssetSourceBuilder{
@@ -209,7 +206,7 @@ impl AssetSourceBuilder {
209
206
Some(source)
210
207
}
211
208
212
-
/// Will use the given `reader` function to construct unprocessed [`AssetReader`] instances.
209
+
/// Will use the given `reader` function to construct unprocessed [`AssetReader`](crate::io::AssetReader) instances.
/// A [`Resource`] that hold (repeatable) functions capable of producing new [`AssetReader`] and [`AssetWriter`] instances
308
+
/// A [`Resource`] that hold (repeatable) functions capable of producing new [`AssetReader`](crate::io::AssetReader) and [`AssetWriter`](crate::io::AssetWriter) instances
312
309
/// for a given asset source.
313
310
#[derive(Resource,Default)]
314
311
pubstructAssetSourceBuilders{
@@ -371,7 +368,7 @@ impl AssetSourceBuilders {
371
368
}
372
369
}
373
370
374
-
/// A collection of unprocessed and processed [`AssetReader`], [`AssetWriter`], and [`AssetWatcher`] instances
371
+
/// A collection of unprocessed and processed [`AssetReader`](crate::io::AssetReader), [`AssetWriter`](crate::io::AssetWriter), and [`AssetWatcher`] instances
375
372
/// for a specific asset source, identified by an [`AssetSourceId`].
376
373
pubstructAssetSource{
377
374
id:AssetSourceId<'static>,
@@ -397,21 +394,21 @@ impl AssetSource {
397
394
self.id.clone()
398
395
}
399
396
400
-
/// Return's this source's unprocessed [`AssetReader`].
397
+
/// Return's this source's unprocessed [`AssetReader`](crate::io::AssetReader).
401
398
#[inline]
402
399
pubfnreader(&self) -> &dynErasedAssetReader{
403
400
&*self.reader
404
401
}
405
402
406
-
/// Return's this source's unprocessed [`AssetWriter`], if it exists.
403
+
/// Return's this source's unprocessed [`AssetWriter`](crate::io::AssetWriter), if it exists.
/// Return's this source's processed [`AssetWriter`], if it exists.
421
+
/// Return's this source's processed [`AssetWriter`](crate::io::AssetWriter), if it exists.
425
422
#[inline]
426
423
pubfnprocessed_writer(
427
424
&self,
@@ -451,7 +448,7 @@ impl AssetSource {
451
448
self.processed_writer.is_some()
452
449
}
453
450
454
-
/// Returns a builder function for this platform's default [`AssetReader`]. `path` is the relative path to
451
+
/// Returns a builder function for this platform's default [`AssetReader`](crate::io::AssetReader). `path` is the relative path to
455
452
/// the asset root.
456
453
pubfnget_default_reader(
457
454
_path:String,
@@ -466,7 +463,7 @@ impl AssetSource {
466
463
}
467
464
}
468
465
469
-
/// Returns a builder function for this platform's default [`AssetWriter`]. `path` is the relative path to
466
+
/// Returns a builder function for this platform's default [`AssetWriter`](crate::io::AssetWriter). `path` is the relative path to
470
467
/// the asset root. This will return [`None`] if this platform does not support writing assets by default.
471
468
pubfnget_default_writer(
472
469
_path:String,
@@ -557,7 +554,7 @@ impl AssetSource {
557
554
}
558
555
}
559
556
560
-
/// This will cause processed [`AssetReader`] futures (such as [`AssetReader::read`]) to wait until
557
+
/// This will cause processed [`AssetReader`](crate::io::AssetReader) futures (such as [`AssetReader::read`](crate::io::AssetReader::read)) to wait until
561
558
/// the [`AssetProcessor`](crate::AssetProcessor) has finished processing the requested asset.
/// This will cause processed [`AssetReader`] futures (such as [`AssetReader::read`]) to wait until
619
+
/// This will cause processed [`AssetReader`](crate::io::AssetReader) futures (such as [`AssetReader::read`](crate::io::AssetReader::read)) to wait until
623
620
/// the [`AssetProcessor`](crate::AssetProcessor) has finished processing the requested asset.
Copy file name to clipboardExpand all lines: crates/bevy_asset/src/processor/mod.rs
+4-8Lines changed: 4 additions & 8 deletions
Original file line number
Diff line number
Diff line change
@@ -75,11 +75,7 @@ use std::{
75
75
};
76
76
use thiserror::Error;
77
77
78
-
// Needed for doc strings
79
-
#[allow(unused_imports, reason = "Needed for documentation links.")]
80
-
usecrate::io::{AssetReader,AssetWriter};
81
-
82
-
/// A "background" asset processor that reads asset values from a source [`AssetSource`] (which corresponds to an [`AssetReader`] / [`AssetWriter`] pair),
78
+
/// A "background" asset processor that reads asset values from a source [`AssetSource`] (which corresponds to an [`AssetReader`](crate::io::AssetReader) / [`AssetWriter`](crate::io::AssetWriter) pair),
83
79
/// processes them in some way, and writes them to a destination [`AssetSource`].
84
80
///
85
81
/// This will create .meta files (a human-editable serialized form of [`AssetMeta`]) in the source [`AssetSource`] for assets that
@@ -212,9 +208,9 @@ impl AssetProcessor {
212
208
/// Processes all assets. This will:
213
209
/// * For each "processed [`AssetSource`]:
214
210
/// * Scan the [`ProcessorTransactionLog`] and recover from any failures detected
215
-
/// * Scan the processed [`AssetReader`] to build the current view of already processed assets.
216
-
/// * Scan the unprocessed [`AssetReader`] and remove any final processed assets that are invalid or no longer exist.
217
-
/// * For each asset in the unprocessed [`AssetReader`], kick off a new "process job", which will process the asset
211
+
/// * Scan the processed [`AssetReader`](crate::io::AssetReader) to build the current view of already processed assets.
212
+
/// * Scan the unprocessed [`AssetReader`](crate::io::AssetReader) and remove any final processed assets that are invalid or no longer exist.
213
+
/// * For each asset in the unprocessed [`AssetReader`](crate::io::AssetReader), kick off a new "process job", which will process the asset
218
214
/// (if the latest version of the asset has not been processed).
Copy file name to clipboardExpand all lines: crates/bevy_asset/src/server/mod.rs
+3-6Lines changed: 3 additions & 6 deletions
Original file line number
Diff line number
Diff line change
@@ -32,10 +32,7 @@ use std::{any::TypeId, path::Path, sync::Arc};
32
32
use std::{future::Future, panic::AssertUnwindSafe};
33
33
use thiserror::Error;
34
34
35
-
#[allow(unused_imports, reason = "Needed for documentation links.")]
36
-
usecrate::io::{AssetReader,AssetWriter};
37
-
38
-
/// Loads and tracks the state of [`Asset`] values from a configured [`AssetReader`]. This can be used to kick off new asset loads and
35
+
/// Loads and tracks the state of [`Asset`] values from a configured [`AssetReader`](crate::io::AssetReader). This can be used to kick off new asset loads and
39
36
/// retrieve their current load states.
40
37
///
41
38
/// The general process to load an asset is:
@@ -75,7 +72,7 @@ pub enum AssetServerMode {
75
72
}
76
73
77
74
implAssetServer{
78
-
/// Create a new instance of [`AssetServer`]. If `watch_for_changes` is true, the [`AssetReader`] storage will watch for changes to
75
+
/// Create a new instance of [`AssetServer`]. If `watch_for_changes` is true, the [`AssetReader`](crate::io::AssetReader) storage will watch for changes to
/// Create a new instance of [`AssetServer`]. If `watch_for_changes` is true, the [`AssetReader`] storage will watch for changes to
87
+
/// Create a new instance of [`AssetServer`]. If `watch_for_changes` is true, the [`AssetReader`](crate::io::AssetReader) storage will watch for changes to
0 commit comments