pub struct AllowlistEntry {
pub channel: String,
pub peer_id: String,
pub label: Option<String>,
}Expand description
Allowlist entry.
Fields§
§channel: StringChannel pattern (“*” for any).
peer_id: StringPeer ID pattern (“*” for any).
label: Option<String>Optional label.
Implementations§
Source§impl AllowlistEntry
impl AllowlistEntry
Sourcepub fn new(channel: impl Into<String>, peer_id: impl Into<String>) -> Self
pub fn new(channel: impl Into<String>, peer_id: impl Into<String>) -> Self
Create a new allowlist entry.
Sourcepub fn channel_wide(channel: impl Into<String>) -> Self
pub fn channel_wide(channel: impl Into<String>) -> Self
Create an entry that allows any peer on a channel.
Sourcepub fn peer_anywhere(peer_id: impl Into<String>) -> Self
pub fn peer_anywhere(peer_id: impl Into<String>) -> Self
Create an entry that allows a specific peer on any channel.
Trait Implementations§
Source§impl Clone for AllowlistEntry
impl Clone for AllowlistEntry
Source§fn clone(&self) -> AllowlistEntry
fn clone(&self) -> AllowlistEntry
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for AllowlistEntry
impl Debug for AllowlistEntry
Source§impl<'de> Deserialize<'de> for AllowlistEntry
impl<'de> Deserialize<'de> for AllowlistEntry
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for AllowlistEntry
impl RefUnwindSafe for AllowlistEntry
impl Send for AllowlistEntry
impl Sync for AllowlistEntry
impl Unpin for AllowlistEntry
impl UnwindSafe for AllowlistEntry
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