mirror of
https://github.com/tribufu/rust-gamedig
synced 2026-06-01 09:42:41 +00:00
[Service] Update docs.
This commit is contained in:
parent
9f22a4eadf
commit
8abb657800
1 changed files with 5 additions and 3 deletions
|
|
@ -15,7 +15,9 @@ pub enum Filter<'a> {
|
||||||
HasTags(&'a [&'a str]),
|
HasTags(&'a [&'a str]),
|
||||||
MatchName(&'a str),
|
MatchName(&'a str),
|
||||||
MatchVersion(&'a str),
|
MatchVersion(&'a str),
|
||||||
|
/// Restrict to only a server if an IP hosts (on different ports) multiple servers.
|
||||||
RestrictUniqueIP(bool),
|
RestrictUniqueIP(bool),
|
||||||
|
/// Query for servers on a specific address.
|
||||||
OnAddress(&'a str),
|
OnAddress(&'a str),
|
||||||
Whitelisted(bool),
|
Whitelisted(bool),
|
||||||
SpectatorProxy(bool),
|
SpectatorProxy(bool),
|
||||||
|
|
@ -128,10 +130,10 @@ impl<'a> Filter<'a> {
|
||||||
///
|
///
|
||||||
/// let search_filters = SearchFilters::new()
|
/// let search_filters = SearchFilters::new()
|
||||||
/// .insert(Filter::RunsAppID(440))
|
/// .insert(Filter::RunsAppID(440))
|
||||||
/// .insert(Filter::CanHavePassword(true));
|
/// .insert(Filter::IsEmpty(false))
|
||||||
|
/// .insert(Filter::CanHavePassword(false));
|
||||||
/// ```
|
/// ```
|
||||||
/// This would query the servers that are (by App ID) 440 and that can contain
|
/// This will construct filters that search for servers that can't have a password, are not empty and run App ID 440.
|
||||||
/// passwords.
|
|
||||||
#[derive(Debug, Clone, PartialEq, Eq)]
|
#[derive(Debug, Clone, PartialEq, Eq)]
|
||||||
pub struct SearchFilters<'a> {
|
pub struct SearchFilters<'a> {
|
||||||
filters: HashMap<Discriminant<Filter<'a>>, Filter<'a>>,
|
filters: HashMap<Discriminant<Filter<'a>>, Filter<'a>>,
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue