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

zb: attach a type to the ProxyBuilder



Add a phantom field to capture an associated target type with the
builder.

By default, no specific type is associated, so use `()`.
Signed-off-by: default avatarMarc-André Lureau <marcandre.lureau@redhat.com>
parent f211d3b4
......@@ -127,11 +127,12 @@ impl<'a> ProxyInner<'a> {
/// Builder for [`Proxy`].
#[derive(Debug, Clone)]
pub struct ProxyBuilder<'a> {
pub struct ProxyBuilder<'a, T = ()> {
conn: Connection,
destination: Option<Cow<'a, str>>,
path: Option<ObjectPath<'a>>,
interface: Option<Cow<'a, str>>,
proxy_type: std::marker::PhantomData<T>,
}
impl<'a> ProxyBuilder<'a> {
......@@ -142,6 +143,7 @@ impl<'a> ProxyBuilder<'a> {
destination: None,
path: None,
interface: None,
proxy_type: std::marker::PhantomData,
}
}
......
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