Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/amethyst/serde-diff
/ functions
Functions
110 in github.com/amethyst/serde-diff
⨍
Functions
110
◇
Types & classes
37
↓ 7 callers
Function
partial
( old: T, new: T, target: T, expected: T, )
src/tests.rs:32
↓ 5 callers
Function
roundtrip
( old: T, new: T, )
src/tests.rs:12
↓ 4 callers
Method
skip_value
To be called after next_path_element returns a path, but the path is not recognized.
src/apply.rs:102
↓ 3 callers
Method
save_command
Stores an arbitrary DiffCommand to be handled by the type. Any custom sequence of DiffCommands must be followed by Exit.
src/difference.rs:153
↓ 3 callers
Method
serialize_element
(&mut self, _value: &T)
src/counting_serializer.rs:207
↓ 2 callers
Method
deserializable_apply
Create a deserializable Apply, where the given target will be changed when the resulting Apply struct is deserialized
src/config.rs:72
↓ 2 callers
Method
diff
Writes the differences between the old and new value into the given serializer in the form of a sequence of diff commands
src/difference.rs:249
↓ 2 callers
Method
end
(self)
src/counting_serializer.rs:215
↓ 2 callers
Function
enum_fields
(fields : &syn::Fields, mutable: bool)
serde-diff-derive/src/serde_diff/mod.rs:119
↓ 2 callers
Function
generate_arms
(name: &syn::Ident, variant: Option<&syn::Ident>, fields: &syn::Fields, matching: bool)
serde-diff-derive/src/serde_diff/mod.rs:173
↓ 2 callers
Method
ident
Name of the field
serde-diff-derive/src/serde_diff/args.rs:40
↓ 2 callers
Method
opaque
If true, this field should be ignored
serde-diff-derive/src/serde_diff/args.rs:56
↓ 2 callers
Function
parse_field
Called per field to parse and verify it
serde-diff-derive/src/serde_diff/mod.rs:39
↓ 2 callers
Method
pop_path_element
Called when we finish visiting an element. See `push_field` for details
src/difference.rs:127
↓ 2 callers
Method
push_collection_index
Called when we visit an element within an indexed collection
src/difference.rs:101
↓ 2 callers
Method
read_next_command
Returns the next command in the stream. Make sure you know what you're doing!
src/apply.rs:167
↓ 2 callers
Function
respan_token_stream
(stream: proc_macro2::TokenStream, span: proc_macro2::Span)
serde-diff-derive/src/serde_diff/mod.rs:460
↓ 2 callers
Method
serializable_diff
Create a serializable Diff, which when serialized will write the differences between the old and new value into the serializer in the form of a sequen
src/config.rs:46
↓ 2 callers
Method
serialize_seq
(self, _len: Option<usize>)
src/counting_serializer.rs:154
↓ 2 callers
Method
skip
If true, simple diff should be generated inline
serde-diff-derive/src/serde_diff/args.rs:50
↓ 2 callers
Method
skip_value_internal
( &mut self, seq: &mut A, mut depth: i32, )
src/apply.rs:111
↓ 2 callers
Method
ty
Type of the field
serde-diff-derive/src/serde_diff/args.rs:45
↓ 1 callers
Method
apply
Applies a sequence of diff commands to the target, as read by the deserializer
src/apply.rs:39
↓ 1 callers
Function
generate
( input: &syn::DeriveInput, struct_args: args::SerdeDiffStructArgs, target_type: Option<syn::Type>
serde-diff-derive/src/serde_diff/mod.rs:289
↓ 1 callers
Function
generate_fields_diff
( parsed_fields: &[ParsedField], matching : bool, )
serde-diff-derive/src/serde_diff/mod.rs:60
↓ 1 callers
Function
generate_opaque
( _input: &syn::DeriveInput, struct_args: args::SerdeDiffStructArgs, )
serde-diff-derive/src/serde_diff/mod.rs:416
↓ 1 callers
Function
macro_derive
Reads in all tokens for the struct having the
serde-diff-derive/src/serde_diff/mod.rs:8
↓ 1 callers
Function
ok_fields
(fields : &syn::Fields)
serde-diff-derive/src/serde_diff/mod.rs:154
↓ 1 callers
Function
parse_fields
(input: &syn::Fields)
serde-diff-derive/src/serde_diff/mod.rs:45
↓ 1 callers
Function
parse_string_to_type
Adapted from serde's internal `parse_lit_into_ty` function (with the chain of helper functions directly cargo culted over)
serde-diff-derive/src/serde_diff/mod.rs:449
↓ 1 callers
Function
respan_token_tree
(mut token: proc_macro2::TokenTree, span: proc_macro2::Span)
serde-diff-derive/src/serde_diff/mod.rs:467
↓ 1 callers
Method
serialize
(&self, serializer: S)
src/difference.rs:260
↓ 1 callers
Function
spanned_tokens
(s: &syn::LitStr)
serde-diff-derive/src/serde_diff/mod.rs:455
Method
apply
Applies a sequence of diff commands to the target, as read by the deserializer
src/config.rs:77
Method
apply
( &mut self, seq: &mut A, ctx: &mut ApplyContext, )
src/difference.rs:661
Method
apply
( &mut self, seq: &mut A, ctx: &mut ApplyContext, )
src/implementation.rs:360
Method
cause
(&self)
src/counting_serializer.rs:22
Method
custom
(_msg: T)
src/counting_serializer.rs:30
Method
default
()
src/config.rs:25
Method
description
(&self)
src/counting_serializer.rs:19
Method
deserializable
Create a deserializable apply, where the given target will be changed when the resulting Apply struct is deserialized
src/apply.rs:34
Method
deserialize
(deserializer: D)
src/difference.rs:409
Method
deserialize
(self, deserializer: D)
src/apply.rs:52
Method
diff
Writes the differences between the old and new value into the given serializer in the form of a sequence of diff commands
src/config.rs:61
Method
diff
( &self, ctx: &mut DiffContext<'a, S>, other: &Self, )
src/implementation.rs:310
Method
drop
(&mut self)
src/difference.rs:34
Method
expecting
(&self, formatter: &mut std::fmt::Formatter)
src/difference.rs:351
Method
expecting
(&self, formatter: &mut std::fmt::Formatter)
src/apply.rs:62
Method
field_path_mode
Mode for serializing field paths
src/difference.rs:49
Method
fmt
(&self, _f: &mut std::fmt::Formatter<'_>)
src/counting_serializer.rs:14
Method
from
(my_simple_struct: MySimpleStruct)
src/tests.rs:155
Method
has_changes
True if a change operation has been written
src/difference.rs:54
Method
into
(self)
src/tests.rs:164
Function
main
()
examples/enum.rs:11
Function
main
()
examples/struct.rs:22
Function
main
()
examples/simple.rs:10
Function
main
()
examples/nested_struct.rs:42
Function
main
()
examples/map.rs:12
Method
new
Creates a `Config` with default values
src/config.rs:34
Method
next_path_element
Returns the next element if it is a path. If it is a Value or Exit, it returns None.
src/apply.rs:82
Method
push_collection_add
Called when we visit an element within a collection that is new
src/difference.rs:110
Method
push_field
Called when we visit a field. If the structure is recursive (i.e. struct within struct, elements within an array) this may be called more than once be
src/difference.rs:61
Method
push_field_element
(&mut self, f: &'a dyn Fn(&mut S) -> Result<(), S::Error>)
src/difference.rs:119
Method
push_field_index
Called when we visit a field. If the structure is recursive (i.e. struct within struct, elements within an array) this may be called more than once be
src/difference.rs:91
Method
push_full_variant
(&mut self)
src/difference.rs:79
Method
push_variant
(&mut self, variant_name: &'static str)
src/difference.rs:70
Method
read_value
Attempts to deserialize a value
src/apply.rs:142
Method
reborrow
(&'d mut self)
src/difference.rs:177
Method
save_value
Stores a value for an element that has previously been pushed using push_field or similar.
src/difference.rs:147
Function
serde_diff_macro_derive
(input: proc_macro::TokenStream)
serde-diff-derive/src/lib.rs:76
Method
serializable
Create a serializable Diff, which when serialized will write the differences between the old and new value into the serializer in the form of a sequen
src/difference.rs:243
Method
serialize_bool
(self, _v: bool)
src/counting_serializer.rs:50
Method
serialize_bytes
(self, _v: &[u8])
src/counting_serializer.rs:102
Method
serialize_char
(self, _v: char)
src/counting_serializer.rs:94
Method
serialize_f32
(self, _v: f32)
src/counting_serializer.rs:86
Method
serialize_f64
(self, _v: f64)
src/counting_serializer.rs:90
Method
serialize_i16
(self, _v: i16)
src/counting_serializer.rs:58
Method
serialize_i32
(self, _v: i32)
src/counting_serializer.rs:62
Method
serialize_i64
(self, _v: i64)
src/counting_serializer.rs:66
Method
serialize_i8
(self, _v: i8)
src/counting_serializer.rs:54
Method
serialize_map
(self, _len: Option<usize>)
src/counting_serializer.rs:180
Method
serialize_newtype_struct
(self, _name: &'static str, _value: &T)
src/counting_serializer.rs:134
Method
serialize_newtype_variant
( self, _name: &'static str, _variant_index: u32, _variant: &'static str,
src/counting_serializer.rs:141
Method
serialize_none
(self)
src/counting_serializer.rs:106
Method
serialize_some
(self, _value: &T)
src/counting_serializer.rs:110
Method
serialize_str
(self, _v: &str)
src/counting_serializer.rs:98
Method
serialize_struct
( self, _name: &'static str, _len: usize, )
src/counting_serializer.rs:184
Method
serialize_struct_variant
( self, _name: &'static str, _variant_index: u32, _variant: &'static str,
src/counting_serializer.rs:192
Method
serialize_tuple
(self, _len: usize)
src/counting_serializer.rs:158
Method
serialize_tuple_struct
( self, _name: &'static str, _len: usize, )
src/counting_serializer.rs:162
Method
serialize_tuple_variant
( self, _name: &'static str, _variant_index: u32, _variant: &'static str,
src/counting_serializer.rs:170
Method
serialize_u16
(self, _v: u16)
src/counting_serializer.rs:74
Method
serialize_u32
(self, _v: u32)
src/counting_serializer.rs:78
Method
serialize_u64
(self, _v: u64)
src/counting_serializer.rs:82
Method
serialize_u8
(self, _v: u8)
src/counting_serializer.rs:70
Method
serialize_unit
(self)
src/counting_serializer.rs:117
Method
serialize_unit_struct
(self, _name: &'static str)
src/counting_serializer.rs:121
Method
serialize_unit_variant
( self, _name: &'static str, _variant_index: u32, _variant: &'static str,
src/counting_serializer.rs:125
Method
source
(&self)
src/counting_serializer.rs:25
Function
targeted_roundtrip
(old: T, new: T, expected: T)
src/tests.rs:169
next →
1–100 of 110, ranked by callers