Skip to content

Commit

Permalink
rename flag to
Browse files Browse the repository at this point in the history
  • Loading branch information
makspll committed Jul 8, 2022
1 parent aff153a commit 95dc399
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ use quote::ToTokens;
use syn::spanned::Spanned;
use syn::{Attribute, Lit, Meta, NestedMeta};

pub(crate) static IGNORE_SERIALIZATION_ATTR: &str = "do_not_serialize";
pub(crate) static IGNORE_SERIALIZATION_ATTR: &str = "skip_serializing";
pub(crate) static IGNORE_ALL_ATTR: &str = "ignore";

pub(crate) static DEFAULT_ATTR: &str = "default";
Expand Down
4 changes: 2 additions & 2 deletions crates/bevy_reflect/src/serde/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ mod tests {
a: i32,
#[reflect(ignore)]
b: i32,
#[reflect(do_not_serialize)]
#[reflect(skip_serializing)]
c: i32,
d: i32,
}
Expand Down Expand Up @@ -75,7 +75,7 @@ mod tests {
struct TestStruct(
i32,
#[reflect(ignore)] i32,
#[reflect(do_not_serialize)] i32,
#[reflect(skip_serializing)] i32,
i32,
);

Expand Down
4 changes: 2 additions & 2 deletions examples/scene/scene.rs
Original file line number Diff line number Diff line change
Expand Up @@ -28,14 +28,14 @@ struct ComponentA {
}

// Some components have fields that cannot (or should not) be written to scene files. These can be
// ignored with the #[reflect(do_not_serialize)] attribute. This is also generally where the `FromWorld`
// ignored with the #[reflect(skip_serializing)] attribute. This is also generally where the `FromWorld`
// trait comes into play. `FromWorld` gives you access to your App's current ECS `Resources`
// when you construct your component.
#[derive(Component, Reflect)]
#[reflect(Component)]
struct ComponentB {
pub value: String,
#[reflect(do_not_serialize)]
#[reflect(skip_serializing)]
pub _time_since_startup: Duration,
}

Expand Down

0 comments on commit 95dc399

Please sign in to comment.