[][src]Struct libzmq::Group

pub struct Group { /* fields omitted */ }

An CString that is a valid ØMQ group identifier.

Namely, the length this group identifier must not exceed MAX_GROUP_SIZE.

Example

use libzmq::{prelude::TryInto, Group};

let string = "abc".to_owned();

let group: Group = string.try_into()?;
assert_eq!(group, "abc");

Methods

impl Group[src]

pub fn new<B>(bytes: B) -> Result<Self, GroupParseError> where
    B: Into<Vec<u8>>, 
[src]

Creates a new Group from a container of bytes.

A valid Group should not exceed MAX_GROUP_SIZE char and not contain any nul bytes.

pub fn as_c_str(&self) -> &CStr[src]

pub fn to_str(&self) -> Result<&str, Utf8Error>[src]

pub fn to_string_lossy(&self) -> Cow<str>[src]

pub fn as_bytes(&self) -> &[u8][src]

Methods from Deref<Target = GroupSlice>

pub fn as_c_str(&self) -> &CStr[src]

pub fn to_str(&self) -> Result<&str, Utf8Error>[src]

pub fn to_string_lossy(&self) -> Cow<str>[src]

pub fn to_bytes(&self) -> &[u8][src]

Trait Implementations

impl Eq for Group[src]

impl PartialEq<Group> for GroupSlice[src]

#[must_use]
fn ne(&self, other: &Rhs) -> bool
1.0.0[src]

This method tests for !=.

impl<'_> PartialEq<Group> for &'_ GroupSlice[src]

#[must_use]
fn ne(&self, other: &Rhs) -> bool
1.0.0[src]

This method tests for !=.

impl PartialEq<Group> for Group[src]

impl<'a> PartialEq<GroupSlice> for Group[src]

#[must_use]
fn ne(&self, other: &Rhs) -> bool
1.0.0[src]

This method tests for !=.

impl<'a, '_> PartialEq<&'_ GroupSlice> for Group[src]

#[must_use]
fn ne(&self, other: &Rhs) -> bool
1.0.0[src]

This method tests for !=.

impl PartialEq<[u8]> for Group[src]

#[must_use]
fn ne(&self, other: &Rhs) -> bool
1.0.0[src]

This method tests for !=.

impl PartialEq<Group> for [u8][src]

#[must_use]
fn ne(&self, other: &Rhs) -> bool
1.0.0[src]

This method tests for !=.

impl PartialEq<str> for Group[src]

#[must_use]
fn ne(&self, other: &Rhs) -> bool
1.0.0[src]

This method tests for !=.

impl<'_> PartialEq<&'_ str> for Group[src]

#[must_use]
fn ne(&self, other: &Rhs) -> bool
1.0.0[src]

This method tests for !=.

impl PartialEq<Group> for str[src]

#[must_use]
fn ne(&self, other: &Rhs) -> bool
1.0.0[src]

This method tests for !=.

impl Clone for Group[src]

fn clone_from(&mut self, source: &Self)1.0.0[src]

Performs copy-assignment from source. Read more

impl AsRef<GroupSlice> for Group[src]

impl<'a> From<&'a Group> for &'a GroupSlice[src]

impl<'a> From<&'a GroupSlice> for Group[src]

impl From<Group> for CString[src]

impl<'a> From<&'a Group> for Group[src]

impl IntoIterator for Group[src]

type Item = Group

The type of the elements being iterated over.

type IntoIter = IntoIter<Group>

Which kind of iterator are we turning this into?

impl<'a> IntoIterator for &'a Group[src]

type Item = &'a Group

The type of the elements being iterated over.

type IntoIter = IntoIter<&'a Group>

Which kind of iterator are we turning this into?

impl Deref for Group[src]

type Target = GroupSlice

The resulting type after dereferencing.

impl Debug for Group[src]

impl Display for Group[src]

impl Hash for Group[src]

fn hash_slice<H>(data: &[Self], state: &mut H) where
    H: Hasher
1.3.0[src]

Feeds a slice of this type into the given [Hasher]. Read more

impl FromStr for Group[src]

type Err = GroupParseError

The associated error which can be returned from parsing.

impl TryFrom<String> for Group[src]

type Error = GroupParseError

The type returned in the event of a conversion error.

impl<'a> TryFrom<&'a String> for Group[src]

type Error = GroupParseError

The type returned in the event of a conversion error.

impl<'a> TryFrom<&'a str> for Group[src]

type Error = GroupParseError

The type returned in the event of a conversion error.

impl Borrow<GroupSlice> for Group[src]

impl Serialize for Group[src]

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

Auto Trait Implementations

impl Send for Group

impl Sync for Group

Blanket Implementations

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

type Owned = T

The resulting type after obtaining ownership.

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

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

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

impl<I> IntoIterator for I where
    I: Iterator
[src]

type Item = <I as Iterator>::Item

The type of the elements being iterated over.

type IntoIter = I

Which kind of iterator are we turning this into?

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.

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

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

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

impl<T> DeserializeOwned for T where
    T: Deserialize<'de>, 
[src]