[][src]Struct mail_slot::MailslotName

pub struct MailslotName {
    pub domain: String,
    pub path: String,
}

A mailslot name has a specific format, this struct will ensure the correct format is used

The format will always start with two slashes, then the domain name another slash the word "mailslot" another slash and and any valid windows path for the remainder

let local_path = MailslotName::local("name");
assert_eq!(r"\\.\mailslot\name", local_path.to_string());

let net_path = MailslotName::network("domain", "name");
assert_eq!(r"\\domain\mailslot\name", net_path.to_string());

Fields

domain: Stringpath: String

Methods

impl MailslotName[src]

pub fn local(path: &str) -> Self[src]

This will create a mailslot name with a local domain

pub fn network(domain: &str, path: &str) -> Self[src]

This will create a mailslot name with a domain and path

pub fn default_domain(path: &str) -> Self[src]

This will create a mailslot name with a default domain

Trait Implementations

impl ToString for MailslotName[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> From<T> for T[src]

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

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

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

type Error = !

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.