[−][src]Struct dbus::ErrorName
A wrapper around a string that is guaranteed to be a valid D-Bus bus name.
Methods
impl<'m> ErrorName<'m>
[src]
pub fn new<S: Into<Vec<u8>>>(s: S) -> Result<ErrorName<'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<ErrorName<'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]) -> ErrorName<'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) -> ErrorName<'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<'m> From<String> for ErrorName<'m>
[src]
#Panics
If given string is not valid.
impl<'m> From<&'m String> for ErrorName<'m>
[src]
#Panics
If given string is not valid.
impl<'m> From<&'m str> for ErrorName<'m>
[src]
#Panics
If given string is not valid.
impl<'m> From<ErrorName<'m>> for CString
[src]
impl<'m> From<Cow<'m, str>> for ErrorName<'m>
[src]
#Panics
If given string is not valid.
impl<'inner, 'm: 'inner> From<&'m ErrorName<'inner>> for ErrorName<'m>
[src]
impl<'a> PartialEq<ErrorName<'a>> for ErrorName<'a>
[src]
impl<'a> Clone for ErrorName<'a>
[src]
fn clone(&self) -> ErrorName<'a>
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more
impl<'m> AsRef<CStr> for ErrorName<'m>
[src]
impl<'a> PartialOrd<ErrorName<'a>> for ErrorName<'a>
[src]
fn partial_cmp(&self, other: &ErrorName<'a>) -> Option<Ordering>
[src]
fn lt(&self, other: &ErrorName<'a>) -> bool
[src]
fn le(&self, other: &ErrorName<'a>) -> bool
[src]
fn gt(&self, other: &ErrorName<'a>) -> bool
[src]
fn ge(&self, other: &ErrorName<'a>) -> bool
[src]
impl<'a> Eq for ErrorName<'a>
[src]
impl<'a> Ord for ErrorName<'a>
[src]
fn cmp(&self, other: &ErrorName<'a>) -> Ordering
[src]
fn max(self, other: Self) -> Self
1.21.0[src]
Compares and returns the maximum of two values. Read more
fn min(self, other: Self) -> Self
1.21.0[src]
Compares and returns the minimum of two values. Read more
fn clamp(self, min: Self, max: Self) -> Self
[src]
clamp
)Restrict a value to a certain interval. Read more
impl<'m> Deref for ErrorName<'m>
[src]
impl<'m> Display for ErrorName<'m>
[src]
impl<'a> Debug for ErrorName<'a>
[src]
impl<'m> Hash for ErrorName<'m>
[src]
Auto Trait Implementations
impl<'a> Unpin for ErrorName<'a>
impl<'a> Sync for ErrorName<'a>
impl<'a> Send for ErrorName<'a>
impl<'a> RefUnwindSafe for ErrorName<'a>
impl<'a> UnwindSafe for ErrorName<'a>
Blanket Implementations
impl<T> From<T> for T
[src]
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, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
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>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
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> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,