MCPcopy Create free account

hub / github.com/amethyst/serde-diff / functions

Functions110 in github.com/amethyst/serde-diff

↓ 7 callersFunctionpartial
( old: T, new: T, target: T, expected: T, )
src/tests.rs:32
↓ 5 callersFunctionroundtrip
( old: T, new: T, )
src/tests.rs:12
↓ 4 callersMethodskip_value
To be called after next_path_element returns a path, but the path is not recognized.
src/apply.rs:102
↓ 3 callersMethodsave_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 callersMethodserialize_element
(&mut self, _value: &T)
src/counting_serializer.rs:207
↓ 2 callersMethoddeserializable_apply
Create a deserializable Apply, where the given target will be changed when the resulting Apply struct is deserialized
src/config.rs:72
↓ 2 callersMethoddiff
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 callersMethodend
(self)
src/counting_serializer.rs:215
↓ 2 callersFunctionenum_fields
(fields : &syn::Fields, mutable: bool)
serde-diff-derive/src/serde_diff/mod.rs:119
↓ 2 callersFunctiongenerate_arms
(name: &syn::Ident, variant: Option<&syn::Ident>, fields: &syn::Fields, matching: bool)
serde-diff-derive/src/serde_diff/mod.rs:173
↓ 2 callersMethodident
Name of the field
serde-diff-derive/src/serde_diff/args.rs:40
↓ 2 callersMethodopaque
If true, this field should be ignored
serde-diff-derive/src/serde_diff/args.rs:56
↓ 2 callersFunctionparse_field
Called per field to parse and verify it
serde-diff-derive/src/serde_diff/mod.rs:39
↓ 2 callersMethodpop_path_element
Called when we finish visiting an element. See `push_field` for details
src/difference.rs:127
↓ 2 callersMethodpush_collection_index
Called when we visit an element within an indexed collection
src/difference.rs:101
↓ 2 callersMethodread_next_command
Returns the next command in the stream. Make sure you know what you're doing!
src/apply.rs:167
↓ 2 callersFunctionrespan_token_stream
(stream: proc_macro2::TokenStream, span: proc_macro2::Span)
serde-diff-derive/src/serde_diff/mod.rs:460
↓ 2 callersMethodserializable_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 callersMethodserialize_seq
(self, _len: Option<usize>)
src/counting_serializer.rs:154
↓ 2 callersMethodskip
If true, simple diff should be generated inline
serde-diff-derive/src/serde_diff/args.rs:50
↓ 2 callersMethodskip_value_internal
( &mut self, seq: &mut A, mut depth: i32, )
src/apply.rs:111
↓ 2 callersMethodty
Type of the field
serde-diff-derive/src/serde_diff/args.rs:45
↓ 1 callersMethodapply
Applies a sequence of diff commands to the target, as read by the deserializer
src/apply.rs:39
↓ 1 callersFunctiongenerate
( input: &syn::DeriveInput, struct_args: args::SerdeDiffStructArgs, target_type: Option<syn::Type>
serde-diff-derive/src/serde_diff/mod.rs:289
↓ 1 callersFunctiongenerate_fields_diff
( parsed_fields: &[ParsedField], matching : bool, )
serde-diff-derive/src/serde_diff/mod.rs:60
↓ 1 callersFunctiongenerate_opaque
( _input: &syn::DeriveInput, struct_args: args::SerdeDiffStructArgs, )
serde-diff-derive/src/serde_diff/mod.rs:416
↓ 1 callersFunctionmacro_derive
Reads in all tokens for the struct having the
serde-diff-derive/src/serde_diff/mod.rs:8
↓ 1 callersFunctionok_fields
(fields : &syn::Fields)
serde-diff-derive/src/serde_diff/mod.rs:154
↓ 1 callersFunctionparse_fields
(input: &syn::Fields)
serde-diff-derive/src/serde_diff/mod.rs:45
↓ 1 callersFunctionparse_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 callersFunctionrespan_token_tree
(mut token: proc_macro2::TokenTree, span: proc_macro2::Span)
serde-diff-derive/src/serde_diff/mod.rs:467
↓ 1 callersMethodserialize
(&self, serializer: S)
src/difference.rs:260
↓ 1 callersFunctionspanned_tokens
(s: &syn::LitStr)
serde-diff-derive/src/serde_diff/mod.rs:455
Methodapply
Applies a sequence of diff commands to the target, as read by the deserializer
src/config.rs:77
Methodapply
( &mut self, seq: &mut A, ctx: &mut ApplyContext, )
src/difference.rs:661
Methodapply
( &mut self, seq: &mut A, ctx: &mut ApplyContext, )
src/implementation.rs:360
Methodcause
(&self)
src/counting_serializer.rs:22
Methodcustom
(_msg: T)
src/counting_serializer.rs:30
Methoddefault
()
src/config.rs:25
Methoddescription
(&self)
src/counting_serializer.rs:19
Methoddeserializable
Create a deserializable apply, where the given target will be changed when the resulting Apply struct is deserialized
src/apply.rs:34
Methoddeserialize
(deserializer: D)
src/difference.rs:409
Methoddeserialize
(self, deserializer: D)
src/apply.rs:52
Methoddiff
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
Methoddiff
( &self, ctx: &mut DiffContext<'a, S>, other: &Self, )
src/implementation.rs:310
Methoddrop
(&mut self)
src/difference.rs:34
Methodexpecting
(&self, formatter: &mut std::fmt::Formatter)
src/difference.rs:351
Methodexpecting
(&self, formatter: &mut std::fmt::Formatter)
src/apply.rs:62
Methodfield_path_mode
Mode for serializing field paths
src/difference.rs:49
Methodfmt
(&self, _f: &mut std::fmt::Formatter<'_>)
src/counting_serializer.rs:14
Methodfrom
(my_simple_struct: MySimpleStruct)
src/tests.rs:155
Methodhas_changes
True if a change operation has been written
src/difference.rs:54
Methodinto
(self)
src/tests.rs:164
Functionmain
()
examples/enum.rs:11
Functionmain
()
examples/struct.rs:22
Functionmain
()
examples/simple.rs:10
Functionmain
()
examples/nested_struct.rs:42
Functionmain
()
examples/map.rs:12
Methodnew
Creates a `Config` with default values
src/config.rs:34
Methodnext_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
Methodpush_collection_add
Called when we visit an element within a collection that is new
src/difference.rs:110
Methodpush_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
Methodpush_field_element
(&mut self, f: &'a dyn Fn(&mut S) -> Result<(), S::Error>)
src/difference.rs:119
Methodpush_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
Methodpush_full_variant
(&mut self)
src/difference.rs:79
Methodpush_variant
(&mut self, variant_name: &'static str)
src/difference.rs:70
Methodread_value
Attempts to deserialize a value
src/apply.rs:142
Methodreborrow
(&'d mut self)
src/difference.rs:177
Methodsave_value
Stores a value for an element that has previously been pushed using push_field or similar.
src/difference.rs:147
Functionserde_diff_macro_derive
(input: proc_macro::TokenStream)
serde-diff-derive/src/lib.rs:76
Methodserializable
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
Methodserialize_bool
(self, _v: bool)
src/counting_serializer.rs:50
Methodserialize_bytes
(self, _v: &[u8])
src/counting_serializer.rs:102
Methodserialize_char
(self, _v: char)
src/counting_serializer.rs:94
Methodserialize_f32
(self, _v: f32)
src/counting_serializer.rs:86
Methodserialize_f64
(self, _v: f64)
src/counting_serializer.rs:90
Methodserialize_i16
(self, _v: i16)
src/counting_serializer.rs:58
Methodserialize_i32
(self, _v: i32)
src/counting_serializer.rs:62
Methodserialize_i64
(self, _v: i64)
src/counting_serializer.rs:66
Methodserialize_i8
(self, _v: i8)
src/counting_serializer.rs:54
Methodserialize_map
(self, _len: Option<usize>)
src/counting_serializer.rs:180
Methodserialize_newtype_struct
(self, _name: &'static str, _value: &T)
src/counting_serializer.rs:134
Methodserialize_newtype_variant
( self, _name: &'static str, _variant_index: u32, _variant: &'static str,
src/counting_serializer.rs:141
Methodserialize_none
(self)
src/counting_serializer.rs:106
Methodserialize_some
(self, _value: &T)
src/counting_serializer.rs:110
Methodserialize_str
(self, _v: &str)
src/counting_serializer.rs:98
Methodserialize_struct
( self, _name: &'static str, _len: usize, )
src/counting_serializer.rs:184
Methodserialize_struct_variant
( self, _name: &'static str, _variant_index: u32, _variant: &'static str,
src/counting_serializer.rs:192
Methodserialize_tuple
(self, _len: usize)
src/counting_serializer.rs:158
Methodserialize_tuple_struct
( self, _name: &'static str, _len: usize, )
src/counting_serializer.rs:162
Methodserialize_tuple_variant
( self, _name: &'static str, _variant_index: u32, _variant: &'static str,
src/counting_serializer.rs:170
Methodserialize_u16
(self, _v: u16)
src/counting_serializer.rs:74
Methodserialize_u32
(self, _v: u32)
src/counting_serializer.rs:78
Methodserialize_u64
(self, _v: u64)
src/counting_serializer.rs:82
Methodserialize_u8
(self, _v: u8)
src/counting_serializer.rs:70
Methodserialize_unit
(self)
src/counting_serializer.rs:117
Methodserialize_unit_struct
(self, _name: &'static str)
src/counting_serializer.rs:121
Methodserialize_unit_variant
( self, _name: &'static str, _variant_index: u32, _variant: &'static str,
src/counting_serializer.rs:125
Methodsource
(&self)
src/counting_serializer.rs:25
Functiontargeted_roundtrip
(old: T, new: T, expected: T)
src/tests.rs:169
next →1–100 of 110, ranked by callers