tonic icon indicating copy to clipboard operation
tonic copied to clipboard

tonic_build clone server

Open BadBastion opened this issue 6 months ago • 0 comments

Add the option to generate Server wrappers that clones the inner type instead of using Arc<T>.

/// Service generator builder.
#[derive(Debug, Clone)]
pub struct Builder {
    ...
    // These should be mutually exclusive, possibly an Enum
    pub(crate) use_arc_self: bool,
    pub(crate) use_clone_self: bool,
    ...
}

If this seems reasonable, I am more than happy to implement it my self.

BadBastion avatar Aug 01 '24 20:08 BadBastion