interprocess::local_socket

Trait NameType

Source
pub trait NameType:
    Copy
    + Debug
    + Eq
    + Send
    + Sync
    + Unpin
    + Sealed {
    // Required method
    fn is_supported() -> bool;
}
Expand description

Mappings from string types to local socket names.

Types that implement this trait are uninhabited type-level markers: those which implement PathNameType serve as generic arguments for ToFsName::to_fs_name(), while those which implement NamespacedNameType are used with ToNsName::to_ns_name().

It is a breaking change for a mapping to meaningfully change. More concretely, if a name produced by this mapping from some input results in a valid listener via server creation or successfully locates one via client creation, the name type will continue to map that input to the same name, for the OS’s definition of “same”.

Required Methods§

Source

fn is_supported() -> bool

Whether the name type is supported within the runtime circumstances of the program.

May entail querying support status from the OS, returning false in the event of an OS error.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§

Source§

impl NameType for AbstractNsUdSocket

Available on Unix only.
Source§

impl NameType for FilesystemUdSocket

Available on Unix only.
Source§

impl NameType for SpecialDirUdSocket

Available on Unix only.
Source§

impl NameType for GenericFilePath

Source§

impl NameType for GenericNamespaced