Commit 691c6a54 authored by Marc-André Lureau's avatar Marc-André Lureau
Browse files

zm: add ProxyName::builder()


Signed-off-by: default avatarMarc-André Lureau <marcandre.lureau@redhat.com>
parent e3253001
......@@ -147,8 +147,13 @@ pub fn create_proxy(args: &[NestedMeta], input: &ItemTrait, azync: bool) -> Toke
impl<'c> #proxy_name<'c> {
/// Creates a new proxy with the default service & path.
pub fn new(conn: &#connection) -> Self {
Self::builder(conn).build()
}
/// Returns a customizable builder for this proxy.
pub fn builder(conn: &#connection) -> ::#zbus::azync::ProxyBuilder<'c, Self> {
let conn = &conn.clone().into();
::#zbus::azync::ProxyBuilder::new(conn).build()
::#zbus::azync::ProxyBuilder::new(conn)
}
/// Consumes `self`, returning the underlying `zbus::Proxy`.
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment