pub struct Filter<'a> {
pub gamedir: Option<Str<&'a [u8]>>,
pub map: Option<Str<&'a [u8]>>,
pub clver: Option<Version>,
pub protocol: Option<u8>,
pub key: Option<u32>,
pub flags: FilterFlags,
pub flags_mask: FilterFlags,
}Expand description
Server filter.
Fields§
§gamedir: Option<Str<&'a [u8]>>Servers running the specified modification (ex. cstrike)
map: Option<Str<&'a [u8]>>Servers running the specified map (ex. cs_italy)
clver: Option<Version>Client version.
protocol: Option<u8>Protocol version
key: Option<u32>A number that master must sent back to game client.
flags: FilterFlagsAdditional filter flags.
flags_mask: FilterFlagsFilter flags mask.
Implementations§
Source§impl Filter<'_>
impl Filter<'_>
Sourcepub fn insert_flag(&mut self, flag: FilterFlags, value: bool)
pub fn insert_flag(&mut self, flag: FilterFlags, value: bool)
Insert filter flag.
Sourcepub fn contains_flags(&self, other: FilterFlags) -> Option<bool>
pub fn contains_flags(&self, other: FilterFlags) -> Option<bool>
Test if all other flags are set in flags_mask and in flags.
Sourcepub fn matches(&self, _addr: SocketAddr, info: &ServerInfo) -> bool
pub fn matches(&self, _addr: SocketAddr, info: &ServerInfo) -> bool
Returns true if a server matches the filter.
Trait Implementations§
impl<'a> Eq for Filter<'a>
impl<'a> StructuralPartialEq for Filter<'a>
Auto Trait Implementations§
impl<'a> Freeze for Filter<'a>
impl<'a> RefUnwindSafe for Filter<'a>
impl<'a> Send for Filter<'a>
impl<'a> Sync for Filter<'a>
impl<'a> Unpin for Filter<'a>
impl<'a> UnwindSafe for Filter<'a>
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