[−][src]Struct libzmq::Group
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]
B: Into<Vec<u8>>,
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]
fn eq(&self, other: &Group) -> bool
[src]
#[must_use]
fn ne(&self, other: &Rhs) -> bool
1.0.0[src]
This method tests for !=
.
impl<'_> PartialEq<Group> for &'_ GroupSlice
[src]
fn eq(&self, other: &Group) -> bool
[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]
fn eq(&self, other: &GroupSlice) -> bool
[src]
#[must_use]
fn ne(&self, other: &Rhs) -> bool
1.0.0[src]
This method tests for !=
.
impl<'a, '_> PartialEq<&'_ GroupSlice> for Group
[src]
fn eq(&self, other: &&GroupSlice) -> bool
[src]
#[must_use]
fn ne(&self, other: &Rhs) -> bool
1.0.0[src]
This method tests for !=
.
impl PartialEq<[u8]> for Group
[src]
fn eq(&self, other: &[u8]) -> bool
[src]
#[must_use]
fn ne(&self, other: &Rhs) -> bool
1.0.0[src]
This method tests for !=
.
impl PartialEq<Group> for [u8]
[src]
fn eq(&self, other: &Group) -> bool
[src]
#[must_use]
fn ne(&self, other: &Rhs) -> bool
1.0.0[src]
This method tests for !=
.
impl PartialEq<str> for Group
[src]
fn eq(&self, other: &str) -> bool
[src]
#[must_use]
fn ne(&self, other: &Rhs) -> bool
1.0.0[src]
This method tests for !=
.
impl<'_> PartialEq<&'_ str> for Group
[src]
fn eq(&self, other: &&str) -> bool
[src]
#[must_use]
fn ne(&self, other: &Rhs) -> bool
1.0.0[src]
This method tests for !=
.
impl PartialEq<Group> for str
[src]
fn eq(&self, other: &Group) -> bool
[src]
#[must_use]
fn ne(&self, other: &Rhs) -> bool
1.0.0[src]
This method tests for !=
.
impl Clone for Group
[src]
fn clone(&self) -> 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]
fn as_ref(&self) -> &GroupSlice
[src]
impl<'a> From<&'a Group> for &'a GroupSlice
[src]
impl<'a> From<&'a GroupSlice> for Group
[src]
fn from(s: &'a GroupSlice) -> Self
[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?
fn into_iter(self) -> Self::IntoIter
[src]
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?
fn into_iter(self) -> Self::IntoIter
[src]
impl Deref for Group
[src]
impl Debug for Group
[src]
impl Display for Group
[src]
impl Hash for Group
[src]
fn hash<__H: Hasher>(&self, state: &mut __H)
[src]
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
1.3.0[src]
H: Hasher,
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.
fn from_str(s: &str) -> Result<Self, Self::Err>
[src]
impl TryFrom<String> for Group
[src]
type Error = GroupParseError
The type returned in the event of a conversion error.
fn try_from(value: String) -> Result<Self, Self::Error>
[src]
impl<'a> TryFrom<&'a String> for Group
[src]
type Error = GroupParseError
The type returned in the event of a conversion error.
fn try_from(value: &'a String) -> Result<Self, Self::Error>
[src]
impl<'a> TryFrom<&'a str> for Group
[src]
type Error = GroupParseError
The type returned in the event of a conversion error.
fn try_from(value: &'a str) -> Result<Self, Self::Error>
[src]
impl Borrow<GroupSlice> for Group
[src]
fn borrow(&self) -> &GroupSlice
[src]
impl Serialize for Group
[src]
impl<'de> Deserialize<'de> for Group
[src]
fn deserialize<D>(deserializer: D) -> Result<Self, D::Error> where
D: Deserializer<'de>,
[src]
D: Deserializer<'de>,
Auto Trait Implementations
Blanket Implementations
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> From<T> for T
[src]
impl<I> IntoIterator for I where
I: Iterator,
[src]
I: Iterator,
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?
fn into_iter(self) -> I
[src]
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> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> DeserializeOwned for T where
T: Deserialize<'de>,
[src]
T: Deserialize<'de>,