% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/adapter.R
\name{adapter}
\alias{adapter}
\title{Adapter Registry for Class-Specific Deep Sharing}
\description{
Register custom traversal logic for specific classes during
deep sharing operations. Adapters allow fine-grained control over how
objects are decomposed and reconstructed.
}
\details{
The adapter registry provides a way to customize how specific classes are
handled during deep sharing. Instead of generic slot traversal for S4 objects
or element-wise traversal for lists, you can provide custom functions to:

\enumerate{
\item Extract the shareable children from an object (\code{children})
\item Reconstruct the object from shared children (\code{replace})
}

This is useful for:
\itemize{
\item Complex S4 objects where only certain slots should be shared
\item S3 objects with internal structure that differs from list structure
\item Objects with accessors that should be used instead of direct slot access
}
}
\seealso{
\code{\link{share}} for the main sharing function that uses adapters.
}
