In order for an object to be patchable, it needs to implement the Patchable interface:
interface Patchable<P> {
patch(patch: P): this;
}
By default any class that extends AutoEncoder (see Encoding & decoding (structures)), is patchable.
You rarely need to manually implement the patch method yourself. As an example of a manual implementation, you can look at TranslatedString (shared/structures/src/TranslatedString.ts)