diff --git a/src/csv.rs b/src/csv.rs index c7eaa3b..91e04b4 100644 --- a/src/csv.rs +++ b/src/csv.rs @@ -62,7 +62,8 @@ where } } -struct CsvAssetLoader { +/// Loads your asset type `A` from csv files +pub struct CsvAssetLoader { extensions: Vec<&'static str>, _marker: PhantomData, delimiter: u8, diff --git a/src/json.rs b/src/json.rs index 27fc450..34b123f 100644 --- a/src/json.rs +++ b/src/json.rs @@ -37,7 +37,8 @@ where } } -struct JsonAssetLoader { +/// Loads your asset type `A` from json files +pub struct JsonAssetLoader { extensions: Vec<&'static str>, _marker: PhantomData, } diff --git a/src/msgpack.rs b/src/msgpack.rs index ac0a343..de58697 100644 --- a/src/msgpack.rs +++ b/src/msgpack.rs @@ -37,7 +37,8 @@ where } } -struct MsgPackAssetLoader { +/// Loads your asset type `A` from `MessagePack` files +pub struct MsgPackAssetLoader { extensions: Vec<&'static str>, _marker: PhantomData, } diff --git a/src/postcard.rs b/src/postcard.rs index 3f41562..f21efb0 100644 --- a/src/postcard.rs +++ b/src/postcard.rs @@ -44,7 +44,8 @@ where } } -struct PostcardAssetLoader { +/// Loads your asset type `A` from `Postcard` files +pub struct PostcardAssetLoader { extensions: Vec<&'static str>, _marker: PhantomData, } @@ -88,10 +89,19 @@ where } } -struct PostcardAssetSaver { +/// Saves your asset type `A` to `Postcard` files +pub struct PostcardAssetSaver { _marker: PhantomData, } +impl Default for PostcardAssetSaver { + fn default() -> Self { + Self { + _marker: PhantomData, + } + } +} + impl AssetSaver for PostcardAssetSaver { type Asset = A; type Settings = (); diff --git a/src/ron.rs b/src/ron.rs index 60c602e..3d9745b 100644 --- a/src/ron.rs +++ b/src/ron.rs @@ -37,7 +37,8 @@ where } } -struct RonAssetLoader { +/// Loads your asset type `A` from ron files +pub struct RonAssetLoader { extensions: Vec<&'static str>, _marker: PhantomData, } diff --git a/src/toml.rs b/src/toml.rs index a491b27..7f37bcb 100644 --- a/src/toml.rs +++ b/src/toml.rs @@ -37,7 +37,8 @@ where } } -struct TomlAssetLoader { +/// Loads your asset type `A` from toml files +pub struct TomlAssetLoader { extensions: Vec<&'static str>, _marker: PhantomData, } diff --git a/src/xml.rs b/src/xml.rs index 15312c9..ab0fb6f 100644 --- a/src/xml.rs +++ b/src/xml.rs @@ -39,7 +39,8 @@ where } } -struct XmlAssetLoader { +/// Loads your asset type `A` from xml files +pub struct XmlAssetLoader { extensions: Vec<&'static str>, _marker: PhantomData, } diff --git a/src/yaml.rs b/src/yaml.rs index b855c55..d034d05 100644 --- a/src/yaml.rs +++ b/src/yaml.rs @@ -37,7 +37,8 @@ where } } -struct YamlAssetLoader { +/// Loads your asset type `A` from yaml files +pub struct YamlAssetLoader { extensions: Vec<&'static str>, _marker: PhantomData, }