[][src]Struct dbus::strings::Path

pub struct Path<'a>(_);

A wrapper around a string that is guaranteed to be a valid D-Bus object path.

Methods

impl<'m> Path<'m>[src]

pub fn new<S: Into<Vec<u8>>>(s: S) -> Result<Path<'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<Path<'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]) -> Path<'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) -> Path<'static>[src]

Makes sure this string does not contain borrows.

pub fn into_cstring(self) -> CString[src]

Converts this struct to a CString.

Trait Implementations

impl<'a> Append for Path<'a>[src]

impl<'a> Arg for Path<'a>[src]

impl<'m> AsRef<CStr> for Path<'m>[src]

impl<'a> Clone for Path<'a>[src]

impl<'a> Debug for Path<'a>[src]

impl<'a> Default for Path<'a>[src]

impl<'m> Deref for Path<'m>[src]

type Target = str

The resulting type after dereferencing.

impl<'a> DictKey for Path<'a>[src]

impl<'m> Display for Path<'m>[src]

impl<'a> Eq for Path<'a>[src]

impl<'m> From<&'m CStr> for Path<'m>[src]

#Panics

If given string is not valid.

impl<'inner, 'm: 'inner> From<&'m Path<'inner>> for Path<'m>[src]

impl<'m> From<&'m String> for Path<'m>[src]

#Panics

If given string is not valid.

impl<'m> From<&'m str> for Path<'m>[src]

#Panics

If given string is not valid.

impl<'m> From<Cow<'m, str>> for Path<'m>[src]

#Panics

If given string is not valid.

impl<'m> From<Path<'m>> for CString[src]

impl From<Path<'static>> for MessageItem[src]

impl<'m> From<String> for Path<'m>[src]

#Panics

If given string is not valid.

impl<'a> Get<'a> for Path<'static>[src]

impl<'m> Hash for Path<'m>[src]

impl<'a> Ord for Path<'a>[src]

impl<'a> PartialEq<Path<'a>> for Path<'a>[src]

impl<'a> PartialOrd<Path<'a>> for Path<'a>[src]

impl RefArg for Path<'static>[src]

impl<'a> StructuralEq for Path<'a>[src]

impl<'a> StructuralPartialEq for Path<'a>[src]

impl<'a> TryFrom<&'a MessageItem> for &'a Path<'static>[src]

type Error = ()

The type returned in the event of a conversion error.

Auto Trait Implementations

impl<'a> RefUnwindSafe for Path<'a>

impl<'a> Send for Path<'a>

impl<'a> Sync for Path<'a>

impl<'a> Unpin for Path<'a>

impl<'a> UnwindSafe for Path<'a>

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T> ToString for T where
    T: Display + ?Sized
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.