Trait StateSync

Source
pub trait StateSync: Sized {
    type SyncCtx;

    // Provided method
    fn sync(&mut self, _sync_ctx: Self::SyncCtx) -> ParselyResult<()> { ... }
}
Expand description

A trait for syncing a field with any required context. In order to prevent accidental misses of this trait, it’s required for all ParselyWrite implementors. When generating the ParselyWrite implementation, sync will be called on every field.

Required Associated Types§

Provided Methods§

Source

fn sync(&mut self, _sync_ctx: Self::SyncCtx) -> ParselyResult<()>

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementations on Foreign Types§

Source§

impl StateSync for bool

Source§

type SyncCtx = ()

Source§

fn sync(&mut self, _sync_ctx: ()) -> ParselyResult<()>

Source§

impl StateSync for u8

Source§

type SyncCtx = ()

Source§

fn sync(&mut self, _sync_ctx: ()) -> ParselyResult<()>

Source§

impl StateSync for u16

Source§

type SyncCtx = ()

Source§

fn sync(&mut self, _sync_ctx: ()) -> ParselyResult<()>

Source§

impl StateSync for u32

Source§

type SyncCtx = ()

Source§

fn sync(&mut self, _sync_ctx: ()) -> ParselyResult<()>

Source§

impl StateSync for String

Source§

type SyncCtx = ()

Source§

fn sync(&mut self, _sync_ctx: ()) -> ParselyResult<()>

Implementors§

Source§

impl StateSync for u1

Source§

impl StateSync for u2

Source§

impl StateSync for u3

Source§

impl StateSync for u4

Source§

impl StateSync for u5

Source§

impl StateSync for u6

Source§

impl StateSync for u7

Source§

impl StateSync for u9

Source§

impl StateSync for u10

Source§

impl StateSync for u11

Source§

impl StateSync for u12

Source§

impl StateSync for u13

Source§

impl StateSync for u14

Source§

impl StateSync for u15

Source§

impl StateSync for u17

Source§

impl StateSync for u18

Source§

impl StateSync for u19

Source§

impl StateSync for u20

Source§

impl StateSync for u21

Source§

impl StateSync for u22

Source§

impl StateSync for u23

Source§

impl StateSync for u24

Source§

impl StateSync for u25

Source§

impl StateSync for u26

Source§

impl StateSync for u27

Source§

impl StateSync for u28

Source§

impl StateSync for u29

Source§

impl StateSync for u30

Source§

impl StateSync for u31