public static T?ReadNullableStruct <T>(this UnsafeReader reader, CtxReadDelegate <T> itemReader, SerializationCtx ctx) where T : struct { return(reader.ReadNullness() ? itemReader(ctx, reader).ToNullable() : null); }
public static T ReadNullableClass <T>(this UnsafeReader reader, CtxReadDelegate <T> itemReader, SerializationCtx ctx) where T : class { return(reader.ReadNullness() ? itemReader(ctx, reader) : null); }