pub struct ServerAllowlist(/* private fields */);Expand description
The servers a user explicitly allowed in an untrusted workspace.
Duplicates are dropped, keeping the first occurrence, so the order the user gave is preserved for error messages.
§Examples
use mcpls_core::config::{ServerAllowlist, ServerId};
let list = ServerAllowlist::new(["rust", "rust", "go"].map(ServerId::from_static));
assert_eq!(list.as_slice().len(), 2);
assert!(list.contains(&ServerId::from_static("go")));
assert!(!ServerAllowlist::default().contains(&ServerId::from_static("go")));Implementations§
Trait Implementations§
Source§impl Clone for ServerAllowlist
impl Clone for ServerAllowlist
Source§impl Debug for ServerAllowlist
impl Debug for ServerAllowlist
Source§impl Default for ServerAllowlist
impl Default for ServerAllowlist
impl Eq for ServerAllowlist
Source§impl PartialEq for ServerAllowlist
impl PartialEq for ServerAllowlist
impl StructuralPartialEq for ServerAllowlist
Auto Trait Implementations§
impl Freeze for ServerAllowlist
impl RefUnwindSafe for ServerAllowlist
impl Send for ServerAllowlist
impl Sync for ServerAllowlist
impl Unpin for ServerAllowlist
impl UnsafeUnpin for ServerAllowlist
impl UnwindSafe for ServerAllowlist
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.