[−][src]Enum mcquery::Query
The main data structure in this crate
Description
Basic queries are enabled by default. They can be diabled in the server's
server.properties with enable-status=true. This is what is used in the
server list inside Minecraft.
Full queries are diabled by default. They can be enabled in the server's
server.properties with enable-query=true.
Variants
Basic(BasicQueryResponse)Response to a basic query. Can be obtained with Query::get_basic()
See BasicQueryResponse for more
Full(FullQueryResponse)Response to a full query. Can be obtained with Query::get_full()
See FullQueryResponse for more
Implementations
impl Query[src]
pub async fn get_basic<A: ToSocketAddrs, '_>(
address: A,
timeout: Duration,
buffer: &'_ mut [u8]
) -> Result<Self>[src]
address: A,
timeout: Duration,
buffer: &'_ mut [u8]
) -> Result<Self>
Connects with the Minecraft server at address and performs a basic query.
timeout is used as a response timeout. The specified buffer needs to be big
enough to hold all response bytes, else this function will return a
MaybeIncompleteDataError wrapped in an std::io::Error. The Ok value
will be Query::Basic.
pub async fn get_full<A: ToSocketAddrs, '_>(
address: A,
timeout: Duration,
buffer: &'_ mut [u8]
) -> Result<Self>[src]
address: A,
timeout: Duration,
buffer: &'_ mut [u8]
) -> Result<Self>
Connects with the Minecraft server at address and performs a full query.
timeout is used as a response timeout. The specified buffer needs to be big
enough to hold all response bytes, else this function will return a
MaybeIncompleteDataError wrapped in an std::io::Error. The Ok vlaue
will be Query::Full.
Trait Implementations
impl Clone for Query[src]
impl Debug for Query[src]
impl Eq for Query[src]
impl PartialEq<Query> for Query[src]
impl StructuralEq for Query[src]
impl StructuralPartialEq for Query[src]
Auto Trait Implementations
impl RefUnwindSafe for Query
impl Send for Query
impl Sync for Query
impl Unpin for Query
impl UnwindSafe for Query
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized, [src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized, [src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized, [src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T[src]
impl<T> From<T> for T[src]
impl<T, U> Into<U> for T where
U: From<T>, [src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone, [src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T[src]
pub fn clone_into(&self, target: &mut T)[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>, [src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>, [src]
U: TryFrom<T>,