Struct fast_protocol::datatypes::packets::AddResourcePack

source ·
pub struct AddResourcePack {
    pub uuid: UUID,
    pub url: String,
    pub hash: String,
    pub forced: bool,
    pub has_prompt_message: Option<TextComponent>,
}
Expand description

Packet to tell the client that it should add a resource pack

Fields§

§uuid: UUID

uuid of the resource pack

§url: String

url, where the resource pack should be downloaded

§hash: String

hash of the resource pack to enshure that the right one was downloaded

§forced: bool

bool if the resource pack is forced

§has_prompt_message: Option<TextComponent>

optional message that should be displayed for the resource pack

Implementations§

source§

impl AddResourcePack

source

pub fn new( uuid: u128, url: String, hash: String, forced: bool, prompt_message: Option<TextComponent> ) -> Self

function to initialize a new instance of AddResourcePack

§Arguments

uuid - uuid of the resource pack url - url where the resource pack can be downloaded from hash - SHA-1 hash of the resource pack forced - if the resource pack is forced or not prompt_message - Optional message to display for the resource pack

Trait Implementations§

source§

impl DataWriter for AddResourcePack

source§

async fn write(&self, writer: &mut (impl AsyncWrite + Unpin)) -> Result<()>

Writes the data of the object into the defined writer Read more

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.