Replication of derived struct?

I know you can replicate a struct using
bool NetSerialize(FArchive& Ar, class UPackageMap* Map, bool& bOutSuccess);

But how could I have a replicated base struct variable that could be a derived struct with custom data?

MyStructBase RepData;

// Child Class
MyStructBase = DerivedStruct();