[−][src]Struct dbus::strings::Signature
A wrapper around a string that is guaranteed to be a valid (single) D-Bus type signature.
Implementations
impl<'m> Signature<'m>
[src]
pub fn new<S: Into<Vec<u8>>>(s: S) -> Result<Signature<'m>, String>
[src]
Creates a new instance of this struct.
Note: If the no-string-validation feature is activated, this string will not be checked for conformance with the D-Bus specification.
pub fn from_slice(s: &'m [u8]) -> Result<Signature<'m>, String>
[src]
Creates a new instance of this struct. If you end it with \0, it can borrow the slice without extra allocation.
Note: If the no-string-validation feature is activated, this string will not be checked for conformance with the D-Bus specification.
pub unsafe fn from_slice_unchecked(s: &'m [u8]) -> Signature<'m>
[src]
This function creates a new instance of this struct, without checking. It's up to you to guarantee that s ends with a \0 and is valid.
pub fn as_cstr(&self) -> &CStr
[src]
View this struct as a CStr.
pub fn into_static(self) -> Signature<'static>
[src]
Makes sure this string does not contain borrows.
pub fn into_cstring(self) -> CString
[src]
Converts this struct to a CString.
impl Signature<'static>
[src]
Trait Implementations
impl<'a> Append for Signature<'a>
[src]
fn append_by_ref(&self, i: &mut IterAppend)
[src]
fn append(self, ia: &mut IterAppend) where
Self: Sized,
[src]
Self: Sized,
impl<'a> Arg for Signature<'a>
[src]
impl<'m> AsRef<CStr> for Signature<'m>
[src]
impl<'a> Clone for Signature<'a>
[src]
impl<'a> Debug for Signature<'a>
[src]
impl<'m> Deref for Signature<'m>
[src]
impl<'a> DictKey for Signature<'a>
[src]
impl<'m> Display for Signature<'m>
[src]
impl<'a> Eq for Signature<'a>
[src]
impl<'m> From<&'m CStr> for Signature<'m>
[src]
#Panics
If given string is not valid.
impl<'inner, 'm: 'inner> From<&'m Signature<'inner>> for Signature<'m>
[src]
impl<'m> From<&'m String> for Signature<'m>
[src]
#Panics
If given string is not valid.
impl<'m> From<&'m str> for Signature<'m>
[src]
#Panics
If given string is not valid.
impl<'m> From<Cow<'m, str>> for Signature<'m>
[src]
#Panics
If given string is not valid.
impl<'m> From<Signature<'m>> for CString
[src]
impl From<Signature<'static>> for MessageItem
[src]
fn from(i: Signature<'static>) -> MessageItem
[src]
impl From<Signature<'static>> for Argument
[src]
impl<'m> From<String> for Signature<'m>
[src]
#Panics
If given string is not valid.
impl<'a> Get<'a> for Signature<'static>
[src]
impl<'m> Hash for Signature<'m>
[src]
fn hash<H: Hasher>(&self, state: &mut H)
[src]
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
1.3.0[src]
H: Hasher,
impl<'a> Ord for Signature<'a>
[src]
fn cmp(&self, other: &Signature<'a>) -> Ordering
[src]
#[must_use]fn max(self, other: Self) -> Self
1.21.0[src]
#[must_use]fn min(self, other: Self) -> Self
1.21.0[src]
#[must_use]fn clamp(self, min: Self, max: Self) -> Self
[src]
impl<'a> PartialEq<Signature<'a>> for Signature<'a>
[src]
impl<'a> PartialOrd<Signature<'a>> for Signature<'a>
[src]
fn partial_cmp(&self, other: &Signature<'a>) -> Option<Ordering>
[src]
fn lt(&self, other: &Signature<'a>) -> bool
[src]
fn le(&self, other: &Signature<'a>) -> bool
[src]
fn gt(&self, other: &Signature<'a>) -> bool
[src]
fn ge(&self, other: &Signature<'a>) -> bool
[src]
impl RefArg for Signature<'static>
[src]
fn arg_type(&self) -> ArgType
[src]
fn signature(&self) -> Signature<'static>
[src]
fn append(&self, i: &mut IterAppend)
[src]
fn as_any(&self) -> &dyn Any
[src]
fn as_any_mut(&mut self) -> &mut dyn Any
[src]
fn as_str(&self) -> Option<&str>
[src]
fn box_clone(&self) -> Box<dyn RefArg + 'static>
[src]
fn as_i64(&self) -> Option<i64>
[src]
fn as_u64(&self) -> Option<u64>
[src]
fn as_f64(&self) -> Option<f64>
[src]
fn as_iter<'a>(
&'a self
) -> Option<Box<dyn Iterator<Item = &'a dyn RefArg> + 'a>>
[src]
&'a self
) -> Option<Box<dyn Iterator<Item = &'a dyn RefArg> + 'a>>
fn as_static_inner(&self, _index: usize) -> Option<&(dyn RefArg + 'static)> where
Self: 'static,
[src]
Self: 'static,
impl<'a> StructuralEq for Signature<'a>
[src]
impl<'a> StructuralPartialEq for Signature<'a>
[src]
impl<'a> TryFrom<&'a MessageItem> for &'a Signature<'static>
[src]
Auto Trait Implementations
impl<'a> RefUnwindSafe for Signature<'a>
impl<'a> Send for Signature<'a>
impl<'a> Sync for Signature<'a>
impl<'a> Unpin for Signature<'a>
impl<'a> UnwindSafe for Signature<'a>
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T> ToString for T where
T: Display + ?Sized,
[src]
T: Display + ?Sized,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,