Struct cobble_core::minecraft::Server
source · pub struct Server {
pub name: String,
pub ip: String,
pub accept_textures: AcceptTextures,
pub path: PathBuf,
}
Expand description
Represents a single server.
Fields
name: String
Name of the server.
ip: String
IP address of the server.
accept_textures: AcceptTextures
Whether the user accepted server resource packs.
path: PathBuf
Path of the servers.dat file
Implementations
sourceimpl Server
impl Server
sourcepub async fn decode_icon(&self) -> CobbleResult<Option<Vec<u8>>>
pub async fn decode_icon(&self) -> CobbleResult<Option<Vec<u8>>>
Loads the server icon and decodes it into PNG bytes.
sourcepub fn load_base64_icon(&self) -> CobbleResult<Option<String>>
pub fn load_base64_icon(&self) -> CobbleResult<Option<String>>
Loads the server icon as a base64 string.
Trait Implementations
sourceimpl<'de> Deserialize<'de> for Server
impl<'de> Deserialize<'de> for Server
sourcefn 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
impl Eq for Server
impl StructuralEq for Server
impl StructuralPartialEq for Server
Auto Trait Implementations
impl RefUnwindSafe for Server
impl Send for Server
impl Sync for Server
impl Unpin for Server
impl UnwindSafe for Server
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
sourcefn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.