pub struct InputGroupId(/* private fields */);Expand description
The identifier a Discovery Server gives a receiver’s input group.
Receivers advertised with the same input group report the same identifier. It names a group, not a receiver, so no operation takes it.
The identifier is opaque: no UUID spelling is assumed, and it keeps exactly the bytes the server supplied, so it always names the same peer even when those bytes are not valid UTF-8.
Implementations§
Source§impl InputGroupId
impl InputGroupId
Sourcepub fn new(value: impl Into<Vec<u8>>) -> Result<Self>
pub fn new(value: impl Into<Vec<u8>>) -> Result<Self>
Make an identifier from bytes obtained elsewhere, such as a saved selection.
§Errors
Returns Error::InvalidCString when the bytes contain a NUL.
Sourcepub fn to_string_lossy(&self) -> Cow<'_, str>
pub fn to_string_lossy(&self) -> Cow<'_, str>
The identifier as text for display, with any bytes that are not UTF-8 replaced by U+FFFD. Use the identifier itself, not this text, to name the peer again.
Trait Implementations§
Source§impl Clone for InputGroupId
impl Clone for InputGroupId
Source§impl Debug for InputGroupId
impl Debug for InputGroupId
Source§impl Display for InputGroupId
impl Display for InputGroupId
impl Eq for InputGroupId
Source§impl Hash for InputGroupId
impl Hash for InputGroupId
Source§impl Ord for InputGroupId
impl Ord for InputGroupId
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
1.21.0 (const: unstable) · Source§fn min(self, other: Self) -> Selfwhere
Self: Sized,
fn min(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the minimum of two values. Read more
Source§impl PartialEq for InputGroupId
impl PartialEq for InputGroupId
Source§impl PartialOrd for InputGroupId
impl PartialOrd for InputGroupId
impl StructuralPartialEq for InputGroupId
Auto Trait Implementations§
impl Freeze for InputGroupId
impl RefUnwindSafe for InputGroupId
impl Send for InputGroupId
impl Sync for InputGroupId
impl Unpin for InputGroupId
impl UnsafeUnpin for InputGroupId
impl UnwindSafe for InputGroupId
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more