[][src]Struct ashpd::HandleToken

pub struct HandleToken(_);

A handle token is a DBus Object Path element, specified in the RequestProxy or SessionProxy object path following this format /org/freedesktop/portal/desktop/request/SENDER/TOKEN where sender is the caller's unique name and token is the HandleToken.

A valid object path element must only contain the ASCII characters "[A-Z][a-z][0-9]_"

use ashpd::HandleToken;
use std::convert::TryFrom;

assert_eq!(HandleToken::try_from("token").is_ok(), true);

assert_eq!(HandleToken::try_from("/test").is_ok(), false);

assert_eq!(HandleToken::try_from("تجربة").is_ok(), false);

Trait Implementations

impl Debug for HandleToken[src]

impl<'de> Deserialize<'de> for HandleToken[src]

impl Serialize for HandleToken[src]

impl<'_> TryFrom<&'_ str> for HandleToken[src]

type Error = HandleInvalidCharacter

The type returned in the event of a conversion error.

impl TryFrom<String> for HandleToken[src]

type Error = HandleInvalidCharacter

The type returned in the event of a conversion error.

impl Type for HandleToken[src]

Auto Trait Implementations

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> DeserializeOwned for T where
    T: for<'de> Deserialize<'de>, 
[src]

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

impl<T, U> Into<U> for T where
    U: From<T>, 
[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.