Trait dbus::arg::RefArg
[−]
[src]
pub trait RefArg: Debug { fn arg_type(&self) -> ArgType; fn signature(&self) -> Signature<'static>; fn append(&self, _: &mut IterAppend); fn as_any(&self) -> &Any
where
Self: 'static; fn as_any_mut(&mut self) -> &mut Any
where
Self: 'static; fn as_i64(&self) -> Option<i64> { ... } fn as_str(&self) -> Option<&str> { ... } fn as_iter<'a>(&'a self) -> Option<Box<Iterator<Item = &'a RefArg> + 'a>> { ... } }
Object safe version of Arg + Append + Get.
This trait is somewhat under development, which means that not all types are supported and that the API might change. Only use in case Arg is not dynamic enough for your needs.
Required Methods
fn arg_type(&self) -> ArgType
The corresponding D-Bus argument type code.
fn signature(&self) -> Signature<'static>
The corresponding D-Bus type signature for this type.
fn append(&self, _: &mut IterAppend)
Performs the append operation.
fn as_any(&self) -> &Any where
Self: 'static,
Self: 'static,
Transforms this argument to Any (which can be downcasted to read the current value).
fn as_any_mut(&mut self) -> &mut Any where
Self: 'static,
Self: 'static,
Transforms this argument to Any (which can be downcasted to read the current value).
Panic
Will panic if the interior cannot be made mutable, e g, if encapsulated inside a Rc with a reference count > 1.
Provided Methods
fn as_i64(&self) -> Option<i64>
Try to read the argument as an i64.
fn as_str(&self) -> Option<&str>
Try to read the argument as a str.
fn as_iter<'a>(&'a self) -> Option<Box<Iterator<Item = &'a RefArg> + 'a>>
Try to read the argument as an iterator.
Implementors
impl<'a, T: RefArg + ?Sized> RefArg for &'a T
impl<T: RefArg + ?Sized> RefArg for Box<T>
impl<T: RefArg + ?Sized> RefArg for Rc<T>
impl<T: RefArg + ?Sized> RefArg for Arc<T>
impl RefArg for u8
impl RefArg for i16
impl RefArg for u16
impl RefArg for i32
impl RefArg for u32
impl RefArg for i64
impl RefArg for u64
impl RefArg for bool
impl RefArg for f64
impl RefArg for String
impl RefArg for OwnedFd
impl RefArg for Path<'static>
impl RefArg for Signature<'static>
impl<T: RefArg> RefArg for Variant<T>
impl<A: RefArg> RefArg for (A,)
impl<A: RefArg, B: RefArg> RefArg for (A, B)
impl<A: RefArg, B: RefArg, C: RefArg> RefArg for (A, B, C)
impl<A: RefArg, B: RefArg, C: RefArg, D: RefArg> RefArg for (A, B, C, D)
impl<A: RefArg, B: RefArg, C: RefArg, D: RefArg, E: RefArg> RefArg for (A, B, C, D, E)
impl<A: RefArg, B: RefArg, C: RefArg, D: RefArg, E: RefArg, F: RefArg> RefArg for (A, B, C, D, E, F)
impl<A: RefArg, B: RefArg, C: RefArg, D: RefArg, E: RefArg, F: RefArg, G: RefArg> RefArg for (A, B, C, D, E, F, G)
impl<A: RefArg, B: RefArg, C: RefArg, D: RefArg, E: RefArg, F: RefArg, G: RefArg, H: RefArg> RefArg for (A, B, C, D, E, F, G, H)
impl<A: RefArg, B: RefArg, C: RefArg, D: RefArg, E: RefArg, F: RefArg, G: RefArg, H: RefArg, I: RefArg> RefArg for (A, B, C, D, E, F, G, H, I)
impl<A: RefArg, B: RefArg, C: RefArg, D: RefArg, E: RefArg, F: RefArg, G: RefArg, H: RefArg, I: RefArg, J: RefArg> RefArg for (A, B, C, D, E, F, G, H, I, J)
impl<A: RefArg, B: RefArg, C: RefArg, D: RefArg, E: RefArg, F: RefArg, G: RefArg, H: RefArg, I: RefArg, J: RefArg, K: RefArg> RefArg for (A, B, C, D, E, F, G, H, I, J, K)
impl<A: RefArg, B: RefArg, C: RefArg, D: RefArg, E: RefArg, F: RefArg, G: RefArg, H: RefArg, I: RefArg, J: RefArg, K: RefArg, L: RefArg> RefArg for (A, B, C, D, E, F, G, H, I, J, K, L)
impl RefArg for Vec<Box<RefArg>>
impl RefArg for MessageItem
impl<'a, T: Arg + RefArg> RefArg for &'a [T]
impl<T: Arg + RefArg> RefArg for Vec<T>
impl<K: DictKey + RefArg + Eq + Hash, V: RefArg + Arg> RefArg for HashMap<K, V>
impl<'a, T: 'a + Arg + Debug + RefArg, I: Debug + Clone + Iterator<Item = &'a T>> RefArg for Array<'static, T, I>