Trait valence::protocol::Decode

source ·
pub trait Decode<'a>: Sized {
    // Required method
    fn decode(r: &mut &'a [u8]) -> Result<Self, Error>;
}
Expand description

The Decode trait allows objects to be read from the Minecraft protocol. It is the inverse of Encode.

Decode is parameterized by a lifetime. This allows the decoded value to borrow data from the byte slice it was read from.

Deriving

This trait can be implemented automatically for structs and enums by using the Decode derive macro. All components of the type must implement Decode. Components are decoded in the order they appear in the type definition.

For enums, the variant to decode is determined by a leading VarInt discriminant (tag). The discriminant value can be changed using the #[packet(tag = ...)] attribute on the variant in question. Discriminant values are assigned to variants using rules similar to regular enum discriminants.

use valence_protocol::Decode;

#[derive(PartialEq, Debug, Decode)]
struct MyStruct {
    first: i32,
    second: MyEnum,
}

#[derive(PartialEq, Debug, Decode)]
enum MyEnum {
    First,  // tag = 0
    Second, // tag = 1
    #[packet(tag = 25)]
    Third, // tag = 25
    Fourth, // tag = 26
}

let mut r: &[u8] = &[0, 0, 0, 0, 26];

let value = MyStruct::decode(&mut r).unwrap();
let expected = MyStruct {
    first: 0,
    second: MyEnum::Fourth,
};

assert_eq!(value, expected);
assert!(r.is_empty());

Required Methods§

source

fn decode(r: &mut &'a [u8]) -> Result<Self, Error>

Reads this object from the provided byte slice.

Implementations of Decode are expected to shrink the slice from the front as bytes are read.

Object Safety§

This trait is not object safe.

Implementations on Foreign Types§

source§

impl Decode<'_> for bool

source§

fn decode(r: &mut &[u8]) -> Result<bool, Error>

source§

impl Decode<'_> for f32

source§

fn decode(r: &mut &[u8]) -> Result<f32, Error>

source§

impl Decode<'_> for f64

source§

fn decode(r: &mut &[u8]) -> Result<f64, Error>

source§

impl Decode<'_> for i8

source§

fn decode(r: &mut &[u8]) -> Result<i8, Error>

source§

impl Decode<'_> for i16

source§

fn decode(r: &mut &[u8]) -> Result<i16, Error>

source§

impl Decode<'_> for i32

source§

fn decode(r: &mut &[u8]) -> Result<i32, Error>

source§

impl Decode<'_> for i64

source§

fn decode(r: &mut &[u8]) -> Result<i64, Error>

source§

impl Decode<'_> for i128

source§

fn decode(r: &mut &[u8]) -> Result<i128, Error>

source§

impl Decode<'_> for u8

source§

fn decode(r: &mut &[u8]) -> Result<u8, Error>

source§

impl Decode<'_> for u16

source§

fn decode(r: &mut &[u8]) -> Result<u16, Error>

source§

impl Decode<'_> for u32

source§

fn decode(r: &mut &[u8]) -> Result<u32, Error>

source§

impl Decode<'_> for u64

source§

fn decode(r: &mut &[u8]) -> Result<u64, Error>

source§

impl Decode<'_> for u128

source§

fn decode(r: &mut &[u8]) -> Result<u128, Error>

source§

impl Decode<'_> for Box<str>

source§

fn decode(r: &mut &[u8]) -> Result<Box<str>, Error>

source§

impl Decode<'_> for String

source§

fn decode(r: &mut &[u8]) -> Result<String, Error>

source§

impl<'a> Decode<'a> for &'a str

source§

fn decode(r: &mut &'a [u8]) -> Result<&'a str, Error>

source§

impl<'a> Decode<'a> for &'a [i8]

source§

fn decode(r: &mut &'a [u8]) -> Result<&'a [i8], Error>

source§

impl<'a> Decode<'a> for &'a [u8]

source§

fn decode(r: &mut &'a [u8]) -> Result<&'a [u8], Error>

source§

impl<'a> Decode<'a> for ()

source§

fn decode(_r: &mut &'a [u8]) -> Result<(), Error>

source§

impl<'a, 'b, B> Decode<'a> for Cow<'b, B>
where B: ToOwned + ?Sized, <B as ToOwned>::Owned: Decode<'a>,

source§

fn decode(r: &mut &'a [u8]) -> Result<Cow<'b, B>, Error>

source§

impl<'a, A> Decode<'a> for (A,)
where A: Decode<'a>,

source§

fn decode(_r: &mut &'a [u8]) -> Result<(A,), Error>

source§

impl<'a, A, B> Decode<'a> for (A, B)
where A: Decode<'a>, B: Decode<'a>,

source§

fn decode(_r: &mut &'a [u8]) -> Result<(A, B), Error>

source§

impl<'a, A, B, C> Decode<'a> for (A, B, C)
where A: Decode<'a>, B: Decode<'a>, C: Decode<'a>,

source§

fn decode(_r: &mut &'a [u8]) -> Result<(A, B, C), Error>

source§

impl<'a, A, B, C, D> Decode<'a> for (A, B, C, D)
where A: Decode<'a>, B: Decode<'a>, C: Decode<'a>, D: Decode<'a>,

source§

fn decode(_r: &mut &'a [u8]) -> Result<(A, B, C, D), Error>

source§

impl<'a, A, B, C, D, E> Decode<'a> for (A, B, C, D, E)
where A: Decode<'a>, B: Decode<'a>, C: Decode<'a>, D: Decode<'a>, E: Decode<'a>,

source§

fn decode(_r: &mut &'a [u8]) -> Result<(A, B, C, D, E), Error>

source§

impl<'a, A, B, C, D, E, F> Decode<'a> for (A, B, C, D, E, F)
where A: Decode<'a>, B: Decode<'a>, C: Decode<'a>, D: Decode<'a>, E: Decode<'a>, F: Decode<'a>,

source§

impl<'a, A, B, C, D, E, F, G> Decode<'a> for (A, B, C, D, E, F, G)
where A: Decode<'a>, B: Decode<'a>, C: Decode<'a>, D: Decode<'a>, E: Decode<'a>, F: Decode<'a>, G: Decode<'a>,

source§

impl<'a, A, B, C, D, E, F, G, H> Decode<'a> for (A, B, C, D, E, F, G, H)
where A: Decode<'a>, B: Decode<'a>, C: Decode<'a>, D: Decode<'a>, E: Decode<'a>, F: Decode<'a>, G: Decode<'a>, H: Decode<'a>,

source§

impl<'a, A, B, C, D, E, F, G, H, I> Decode<'a> for (A, B, C, D, E, F, G, H, I)
where A: Decode<'a>, B: Decode<'a>, C: Decode<'a>, D: Decode<'a>, E: Decode<'a>, F: Decode<'a>, G: Decode<'a>, H: Decode<'a>, I: Decode<'a>,

source§

impl<'a, A, B, C, D, E, F, G, H, I, J> Decode<'a> for (A, B, C, D, E, F, G, H, I, J)
where A: Decode<'a>, B: Decode<'a>, C: Decode<'a>, D: Decode<'a>, E: Decode<'a>, F: Decode<'a>, G: Decode<'a>, H: Decode<'a>, I: Decode<'a>, J: Decode<'a>,

source§

impl<'a, A, B, C, D, E, F, G, H, I, J, K> Decode<'a> for (A, B, C, D, E, F, G, H, I, J, K)
where A: Decode<'a>, B: Decode<'a>, C: Decode<'a>, D: Decode<'a>, E: Decode<'a>, F: Decode<'a>, G: Decode<'a>, H: Decode<'a>, I: Decode<'a>, J: Decode<'a>, K: Decode<'a>,

source§

impl<'a, A, B, C, D, E, F, G, H, I, J, K, L> Decode<'a> for (A, B, C, D, E, F, G, H, I, J, K, L)
where A: Decode<'a>, B: Decode<'a>, C: Decode<'a>, D: Decode<'a>, E: Decode<'a>, F: Decode<'a>, G: Decode<'a>, H: Decode<'a>, I: Decode<'a>, J: Decode<'a>, K: Decode<'a>, L: Decode<'a>,

source§

impl<'a, K, V> Decode<'a> for BTreeMap<K, V>
where K: Ord + Decode<'a>, V: Decode<'a>,

source§

fn decode(r: &mut &'a [u8]) -> Result<BTreeMap<K, V>, Error>

source§

impl<'a, K, V, S> Decode<'a> for HashMap<K, V, S>
where K: Eq + Hash + Decode<'a>, V: Decode<'a>, S: BuildHasher + Default,

source§

fn decode(r: &mut &'a [u8]) -> Result<HashMap<K, V, S>, Error>

source§

impl<'a, T> Decode<'a> for Option<T>
where T: Decode<'a>,

source§

fn decode(r: &mut &'a [u8]) -> Result<Option<T>, Error>

source§

impl<'a, T> Decode<'a> for Box<[T]>
where T: Decode<'a>,

source§

fn decode(r: &mut &'a [u8]) -> Result<Box<[T]>, Error>

source§

impl<'a, T> Decode<'a> for Box<T>
where T: Decode<'a>,

source§

fn decode(r: &mut &'a [u8]) -> Result<Box<T>, Error>

source§

impl<'a, T> Decode<'a> for BTreeSet<T>
where T: Ord + Decode<'a>,

source§

fn decode(r: &mut &'a [u8]) -> Result<BTreeSet<T>, Error>

source§

impl<'a, T> Decode<'a> for Rc<T>
where T: Decode<'a>,

source§

fn decode(r: &mut &'a [u8]) -> Result<Rc<T>, Error>

source§

impl<'a, T> Decode<'a> for Arc<T>
where T: Decode<'a>,

source§

fn decode(r: &mut &'a [u8]) -> Result<Arc<T>, Error>

source§

impl<'a, T> Decode<'a> for Vec<T>
where T: Decode<'a>,

source§

fn decode(r: &mut &'a [u8]) -> Result<Vec<T>, Error>

source§

impl<'a, T, S> Decode<'a> for HashSet<T, S>
where T: Eq + Hash + Decode<'a>, S: BuildHasher + Default,

source§

fn decode(r: &mut &'a [u8]) -> Result<HashSet<T, S>, Error>

source§

impl<'a, T, const N: usize> Decode<'a> for [T; N]
where T: Decode<'a>,

source§

fn decode(r: &mut &'a [u8]) -> Result<[T; N], Error>

source§

impl<'a, const N: usize> Decode<'a> for &'a [u8; N]

References to fixed-length arrays are not length prefixed.

source§

fn decode(r: &mut &'a [u8]) -> Result<&'a [u8; N], Error>

Implementors§

source§

impl Decode<'_> for BlockKind

source§

impl Decode<'_> for ItemKind

source§

impl Decode<'_> for VillagerData

source§

impl Decode<'_> for DQuat

source§

impl Decode<'_> for DVec2

source§

impl Decode<'_> for DVec3

source§

impl Decode<'_> for IVec3

source§

impl Decode<'_> for Quat

source§

impl Decode<'_> for Vec2

source§

impl Decode<'_> for Vec3

source§

impl Decode<'_> for Vec3A

source§

impl Decode<'_> for Vec4

source§

impl Decode<'_> for Compound

source§

impl Decode<'_> for OptGameMode

source§

impl Decode<'_> for ChunkDeltaUpdateEntry

source§

impl Decode<'_> for BlockPos

source§

impl Decode<'_> for BlockState

source§

impl Decode<'_> for ByteAngle

source§

impl Decode<'_> for ChunkSectionPos

source§

impl Decode<'_> for ItemStack

source§

impl Decode<'_> for Text

source§

impl Decode<'_> for VarInt

source§

impl Decode<'_> for VarLong

source§

impl<'a> Decode<'a> for BlockEntityKind

source§

impl<'a> Decode<'a> for BoatKind

source§

impl<'a> Decode<'a> for CatKind

source§

impl<'a> Decode<'a> for FrogKind

source§

impl<'a> Decode<'a> for PaintingKind

source§

impl<'a> Decode<'a> for Pose

source§

impl<'a> Decode<'a> for SnifferState

source§

impl<'a> Decode<'a> for VillagerKind

source§

impl<'a> Decode<'a> for VillagerProfession

source§

impl<'a> Decode<'a> for Difficulty

source§

impl<'a> Decode<'a> for Direction

source§

impl<'a> Decode<'a> for GameMode

source§

impl<'a> Decode<'a> for Hand

source§

impl<'a> Decode<'a> for HandshakeNextState

source§

impl<'a> Decode<'a> for BossBarAction<'a>

source§

impl<'a> Decode<'a> for BossBarColor

source§

impl<'a> Decode<'a> for BossBarDivision

source§

impl<'a> Decode<'a> for MessageFilterType

source§

impl<'a> Decode<'a> for ChatSuggestionsAction

source§

impl<'a> Decode<'a> for ClickMode

source§

impl<'a> Decode<'a> for ClientCommand

source§

impl<'a> Decode<'a> for ChatMode

source§

impl<'a> Decode<'a> for MainArm

source§

impl<'a> Decode<'a> for Parser

source§

impl<'a> Decode<'a> for StringArg

source§

impl<'a> Decode<'a> for AdvancementTabC2s<'a>

source§

impl<'a> Decode<'a> for ClientStatusC2s

source§

impl<'a> Decode<'a> for ResourcePackStatusC2s

source§

impl<'a> Decode<'a> for UpdatePlayerAbilitiesC2s

source§

impl<'a> Decode<'a> for GameEventKind

source§

impl<'a> Decode<'a> for FeetOrEyes

source§

impl<'a> Decode<'a> for IconType

source§

impl<'a> Decode<'a> for WindowType

source§

impl<'a> Decode<'a> for PlayerAction

source§

impl<'a> Decode<'a> for EntityInteraction

source§

impl<'a> Decode<'a> for RecipeBookId

source§

impl<'a> Decode<'a> for ScoreboardPosition

source§

impl<'a> Decode<'a> for ObjectiveMode<'a>

source§

impl<'a> Decode<'a> for ObjectiveRenderType

source§

impl<'a> Decode<'a> for ScoreboardPlayerUpdateAction<'a>

source§

impl<'a> Decode<'a> for CraftingShapedCategory

source§

impl<'a> Decode<'a> for valence::protocol::packets::play::team_s2c::Mode<'a>

source§

impl<'a> Decode<'a> for TeamColor

source§

impl<'a> Decode<'a> for UpdateCommandBlockMode

source§

impl<'a> Decode<'a> for Action

source§

impl<'a> Decode<'a> for Mirror

source§

impl<'a> Decode<'a> for valence::protocol::packets::play::update_structure_block_c2s::Mode

source§

impl<'a> Decode<'a> for Rotation

source§

impl<'a> Decode<'a> for SoundCategory

source§

impl<'a> Decode<'a> for SoundId<'a>

source§

impl<'a> Decode<'a> for EulerAngle

source§

impl<'a> Decode<'a> for Uuid

source§

impl<'a> Decode<'a> for PackedBlockPos

source§

impl<'a> Decode<'a> for PackedChunkSectionPos

source§

impl<'a> Decode<'a> for HandshakeC2s<'a>

source§

impl<'a> Decode<'a> for LoginCompressionS2c

source§

impl<'a> Decode<'a> for LoginDisconnectS2c<'a>

source§

impl<'a> Decode<'a> for LoginHelloC2s<'a>

source§

impl<'a> Decode<'a> for LoginHelloS2c<'a>

source§

impl<'a> Decode<'a> for LoginKeyC2s<'a>

source§

impl<'a> Decode<'a> for LoginQueryRequestS2c<'a>

source§

impl<'a> Decode<'a> for LoginQueryResponseC2s<'a>

source§

impl<'a> Decode<'a> for LoginSuccessS2c<'a>

source§

impl<'a> Decode<'a> for AdvancementCriteria<'a>

source§

impl<'a> Decode<'a> for AdvancementRequirements<'a>

source§

impl<'a> Decode<'a> for BossBarFlags

source§

impl<'a> Decode<'a> for MessageSignature<'a>

source§

impl<'a> Decode<'a> for ChunkBiome<'a>

source§

impl<'a> Decode<'a> for ChunkDataBlockEntity<'a>

source§

impl<'a> Decode<'a> for SlotChange

source§

impl<'a> Decode<'a> for DisplayedSkinParts

source§

impl<'a> Decode<'a> for CommandArgumentSignature<'a>

source§

impl<'a> Decode<'a> for CommandSuggestionsMatch<'a>

source§

impl<'a> Decode<'a> for Node

source§

impl<'a> Decode<'a> for AttributeModifier

source§

impl<'a> Decode<'a> for AttributeProperty<'a>

source§

impl<'a> Decode<'a> for EquipmentEntry

source§

impl<'a> Decode<'a> for valence::protocol::packets::play::entity_status_effect_s2c::Flags

source§

impl<'a> Decode<'a> for LookAtEntity

source§

impl<'a> Decode<'a> for Icon<'a>

source§

impl<'a> Decode<'a> for PlayerAbilitiesFlags

source§

impl<'a> Decode<'a> for PlayerInputFlags

source§

impl<'a> Decode<'a> for ChatData<'a>

source§

impl<'a> Decode<'a> for PlayerPositionLookFlags

source§

impl<'a> Decode<'a> for TradeOffer

source§

impl<'a> Decode<'a> for Statistic

source§

impl<'a> Decode<'a> for BlockBreakingProgressS2c

source§

impl<'a> Decode<'a> for BlockEntityUpdateS2c<'a>

source§

impl<'a> Decode<'a> for BlockEventS2c

source§

impl<'a> Decode<'a> for BlockUpdateS2c

source§

impl<'a> Decode<'a> for BoatPaddleStateC2s

source§

impl<'a> Decode<'a> for BookUpdateC2s<'a>

source§

impl<'a> Decode<'a> for BossBarS2c<'a>

source§

impl<'a> Decode<'a> for BundleSplitterS2c

source§

impl<'a> Decode<'a> for ButtonClickC2s

source§

impl<'a> Decode<'a> for ChatMessageC2s<'a>

source§

impl<'a> Decode<'a> for ChatMessageS2c<'a>

source§

impl<'a> Decode<'a> for ChatSuggestionsS2c<'a>

source§

impl<'a> Decode<'a> for ChunkBiomeDataS2c<'a>

source§

impl<'a> Decode<'a> for ChunkDataS2c<'a>

source§

impl<'a> Decode<'a> for ChunkDeltaUpdateS2c<'a>

source§

impl<'a> Decode<'a> for ChunkLoadDistanceS2c

source§

impl<'a> Decode<'a> for ChunkRenderDistanceCenterS2c

source§

impl<'a> Decode<'a> for ClearTitleS2c

source§

impl<'a> Decode<'a> for ClickSlotC2s<'a>

source§

impl<'a> Decode<'a> for ClientCommandC2s

source§

impl<'a> Decode<'a> for ClientSettingsC2s<'a>

source§

impl<'a> Decode<'a> for CloseHandledScreenC2s

source§

impl<'a> Decode<'a> for CloseScreenS2c

source§

impl<'a> Decode<'a> for CommandExecutionC2s<'a>

source§

impl<'a> Decode<'a> for CommandSuggestionsS2c<'a>

source§

impl<'a> Decode<'a> for CommandTreeS2c

source§

impl<'a> Decode<'a> for CooldownUpdateS2c

source§

impl<'a> Decode<'a> for CraftFailedResponseS2c<'a>

source§

impl<'a> Decode<'a> for CraftRequestC2s<'a>

source§

impl<'a> Decode<'a> for CreativeInventoryActionC2s

source§

impl<'a> Decode<'a> for CustomPayloadC2s<'a>

source§

impl<'a> Decode<'a> for CustomPayloadS2c<'a>

source§

impl<'a> Decode<'a> for DamageTiltS2c

source§

impl<'a> Decode<'a> for DeathMessageS2c<'a>

source§

impl<'a> Decode<'a> for DifficultyS2c

source§

impl<'a> Decode<'a> for DisconnectS2c<'a>

source§

impl<'a> Decode<'a> for EndCombatS2c

source§

impl<'a> Decode<'a> for EnterCombatS2c

source§

impl<'a> Decode<'a> for EntitiesDestroyS2c<'a>

source§

impl<'a> Decode<'a> for EntityAnimationS2c

source§

impl<'a> Decode<'a> for EntityAttachS2c

source§

impl<'a> Decode<'a> for EntityAttributesS2c<'a>

source§

impl<'a> Decode<'a> for EntityDamageS2c

source§

impl<'a> Decode<'a> for EntityEquipmentUpdateS2c

source§

impl<'a> Decode<'a> for EntityPassengersSetS2c<'a>

source§

impl<'a> Decode<'a> for EntityPositionS2c

source§

impl<'a> Decode<'a> for EntitySetHeadYawS2c

source§

impl<'a> Decode<'a> for EntitySpawnS2c

source§

impl<'a> Decode<'a> for EntityStatusEffectS2c

source§

impl<'a> Decode<'a> for EntityStatusS2c

source§

impl<'a> Decode<'a> for EntityTrackerUpdateS2c<'a>

source§

impl<'a> Decode<'a> for EntityVelocityUpdateS2c

source§

impl<'a> Decode<'a> for ExperienceBarUpdateS2c

source§

impl<'a> Decode<'a> for ExperienceOrbSpawnS2c

source§

impl<'a> Decode<'a> for ExplosionS2c<'a>

source§

impl<'a> Decode<'a> for FeaturesS2c<'a>

source§

impl<'a> Decode<'a> for FullC2s

source§

impl<'a> Decode<'a> for GameJoinS2c<'a>

source§

impl<'a> Decode<'a> for GameMessageS2c<'a>

source§

impl<'a> Decode<'a> for GameStateChangeS2c

source§

impl<'a> Decode<'a> for HandSwingC2s

source§

impl<'a> Decode<'a> for HealthUpdateS2c

source§

impl<'a> Decode<'a> for InventoryS2c<'a>

source§

impl<'a> Decode<'a> for ItemPickupAnimationS2c

source§

impl<'a> Decode<'a> for JigsawGeneratingC2s

source§

impl<'a> Decode<'a> for KeepAliveC2s

source§

impl<'a> Decode<'a> for KeepAliveS2c

source§

impl<'a> Decode<'a> for LightUpdateS2c<'a>

source§

impl<'a> Decode<'a> for LookAndOnGroundC2s

source§

impl<'a> Decode<'a> for LookAtS2c

source§

impl<'a> Decode<'a> for MapUpdateS2c<'a>

source§

impl<'a> Decode<'a> for MessageAcknowledgmentC2s

source§

impl<'a> Decode<'a> for MoveRelativeS2c

source§

impl<'a> Decode<'a> for NbtQueryResponseS2c

source§

impl<'a> Decode<'a> for OnGroundOnlyC2s

source§

impl<'a> Decode<'a> for OpenHorseScreenS2c

source§

impl<'a> Decode<'a> for OpenScreenS2c<'a>

source§

impl<'a> Decode<'a> for OpenWrittenBookS2c

source§

impl<'a> Decode<'a> for OverlayMessageS2c<'a>

source§

impl<'a> Decode<'a> for ParticleS2c<'a>

source§

impl<'a> Decode<'a> for PickFromInventoryC2s

source§

impl<'a> Decode<'a> for PlayPingS2c

source§

impl<'a> Decode<'a> for PlayPongC2s

source§

impl<'a> Decode<'a> for PlaySoundFromEntityS2c

source§

impl<'a> Decode<'a> for PlaySoundS2c<'a>

source§

impl<'a> Decode<'a> for PlayerAbilitiesS2c

source§

impl<'a> Decode<'a> for PlayerActionC2s

source§

impl<'a> Decode<'a> for PlayerActionResponseS2c

source§

impl<'a> Decode<'a> for PlayerInputC2s

source§

impl<'a> Decode<'a> for PlayerInteractBlockC2s

source§

impl<'a> Decode<'a> for PlayerInteractEntityC2s

source§

impl<'a> Decode<'a> for PlayerInteractItemC2s

source§

impl<'a> Decode<'a> for PlayerListHeaderS2c<'a>

source§

impl<'a> Decode<'a> for PlayerListS2c<'a>

source§

impl<'a> Decode<'a> for PlayerPositionLookS2c

source§

impl<'a> Decode<'a> for PlayerRemoveS2c<'a>

source§

impl<'a> Decode<'a> for PlayerRespawnS2c<'a>

source§

impl<'a> Decode<'a> for PlayerSessionC2s<'a>

source§

impl<'a> Decode<'a> for PlayerSpawnPositionS2c

source§

impl<'a> Decode<'a> for PlayerSpawnS2c

source§

impl<'a> Decode<'a> for PositionAndOnGroundC2s

source§

impl<'a> Decode<'a> for ProfilelessChatMessageS2c<'a>

source§

impl<'a> Decode<'a> for QueryBlockNbtC2s

source§

impl<'a> Decode<'a> for QueryEntityNbtC2s

source§

impl<'a> Decode<'a> for RecipeBookDataC2s<'a>

source§

impl<'a> Decode<'a> for RecipeCategoryOptionsC2s

source§

impl<'a> Decode<'a> for RemoveEntityStatusEffectS2c

source§

impl<'a> Decode<'a> for RemoveMessageS2c<'a>

source§

impl<'a> Decode<'a> for RenameItemC2s<'a>

source§

impl<'a> Decode<'a> for RequestCommandCompletionsC2s<'a>

source§

impl<'a> Decode<'a> for ResourcePackSendS2c<'a>

source§

impl<'a> Decode<'a> for RotateAndMoveRelativeS2c

source§

impl<'a> Decode<'a> for RotateS2c

source§

impl<'a> Decode<'a> for ScoreboardDisplayS2c<'a>

source§

impl<'a> Decode<'a> for ScoreboardObjectiveUpdateS2c<'a>

source§

impl<'a> Decode<'a> for ScoreboardPlayerUpdateS2c<'a>

source§

impl<'a> Decode<'a> for ScreenHandlerPropertyUpdateS2c

source§

impl<'a> Decode<'a> for ScreenHandlerSlotUpdateS2c<'a>

source§

impl<'a> Decode<'a> for SelectAdvancementTabS2c<'a>

source§

impl<'a> Decode<'a> for SelectMerchantTradeC2s

source§

impl<'a> Decode<'a> for ServerMetadataS2c<'a>

source§

impl<'a> Decode<'a> for SetCameraEntityS2c

source§

impl<'a> Decode<'a> for SetTradeOffersS2c

source§

impl<'a> Decode<'a> for SignEditorOpenS2c

source§

impl<'a> Decode<'a> for SimulationDistanceS2c

source§

impl<'a> Decode<'a> for SpectatorTeleportC2s

source§

impl<'a> Decode<'a> for StatisticsS2c

source§

impl<'a> Decode<'a> for StopSoundS2c<'a>

source§

impl<'a> Decode<'a> for SubtitleS2c<'a>

source§

impl<'a> Decode<'a> for SynchronizeRecipesS2c<'a>

source§

impl<'a> Decode<'a> for SynchronizeTagsS2c<'a>

source§

impl<'a> Decode<'a> for TeamS2c<'a>

source§

impl<'a> Decode<'a> for TeleportConfirmC2s

source§

impl<'a> Decode<'a> for TitleFadeS2c

source§

impl<'a> Decode<'a> for TitleS2c<'a>

source§

impl<'a> Decode<'a> for UnloadChunkS2c

source§

impl<'a> Decode<'a> for UnlockRecipesS2c<'a>

source§

impl<'a> Decode<'a> for UpdateBeaconC2s

source§

impl<'a> Decode<'a> for UpdateCommandBlockC2s<'a>

source§

impl<'a> Decode<'a> for UpdateCommandBlockMinecartC2s<'a>

source§

impl<'a> Decode<'a> for UpdateDifficultyC2s

source§

impl<'a> Decode<'a> for UpdateDifficultyLockC2s

source§

impl<'a> Decode<'a> for UpdateJigsawC2s<'a>

source§

impl<'a> Decode<'a> for UpdateSelectedSlotC2s

source§

impl<'a> Decode<'a> for UpdateSelectedSlotS2c

source§

impl<'a> Decode<'a> for UpdateSignC2s<'a>

source§

impl<'a> Decode<'a> for UpdateStructureBlockC2s<'a>

source§

impl<'a> Decode<'a> for VehicleMoveC2s

source§

impl<'a> Decode<'a> for VehicleMoveS2c

source§

impl<'a> Decode<'a> for WorldBorderCenterChangedS2c

source§

impl<'a> Decode<'a> for WorldBorderInitializeS2c

source§

impl<'a> Decode<'a> for WorldBorderInterpolateSizeS2c

source§

impl<'a> Decode<'a> for WorldBorderSizeChangedS2c

source§

impl<'a> Decode<'a> for WorldBorderWarningBlocksChangedS2c

source§

impl<'a> Decode<'a> for WorldBorderWarningTimeChangedS2c

source§

impl<'a> Decode<'a> for WorldEventS2c

source§

impl<'a> Decode<'a> for WorldTimeUpdateS2c

source§

impl<'a> Decode<'a> for TeamFlags

source§

impl<'a> Decode<'a> for UpdateCommandBlockFlags

source§

impl<'a> Decode<'a> for valence::protocol::packets::play::update_structure_block_c2s::Flags

source§

impl<'a> Decode<'a> for QueryPingC2s

source§

impl<'a> Decode<'a> for QueryPongS2c

source§

impl<'a> Decode<'a> for QueryRequestC2s

source§

impl<'a> Decode<'a> for QueryResponseS2c<'a>

source§

impl<'a> Decode<'a> for ChunkPos

source§

impl<'a> Decode<'a> for GlobalPos<'a>

source§

impl<'a> Decode<'a> for RawBytes<'a>

source§

impl<'a> Decode<'a> for Velocity

source§

impl<'a, AM> Decode<'a> for GenericAdvancementUpdateS2c<'a, AM>
where AM: 'a + Decode<'a>,

source§

impl<'a, I> Decode<'a> for Advancement<'a, I>
where I: Decode<'a>,

source§

impl<'a, I> Decode<'a> for AdvancementDisplay<'a, I>
where I: Decode<'a>,

source§

impl<'a, S> Decode<'a> for Property<S>
where S: Decode<'a>,

source§

impl<'a, S> Decode<'a> for Ident<S>
where S: Decode<'a>, Ident<S>: TryFrom<S, Error = IdentError>,

source§

impl<'a, T, const MAX_LEN: usize> Decode<'a> for Bounded<Box<[T]>, MAX_LEN>
where T: Decode<'a>,

source§

impl<'a, T, const MAX_LEN: usize> Decode<'a> for Bounded<Vec<T>, MAX_LEN>
where T: Decode<'a>,

source§

impl<'a, T, const N: usize> Decode<'a> for FixedArray<T, N>
where T: Decode<'a>,

source§

impl<'a, const MAX_BYTES: usize> Decode<'a> for Bounded<RawBytes<'a>, MAX_BYTES>

Raises a decoding error if the remainder of the input is larger than MAX_BYTES.

source§

impl<'a, const MAX_CHARS: usize> Decode<'a> for Bounded<&'a str, MAX_CHARS>

source§

impl<'a, const MAX_LEN: usize> Decode<'a> for Bounded<&'a [u8], MAX_LEN>

source§

impl<const BIT_COUNT: usize, const BYTE_COUNT: usize> Decode<'_> for FixedBitSet<BIT_COUNT, BYTE_COUNT>

source§

impl<const MAX_CHARS: usize> Decode<'_> for Bounded<Box<str>, MAX_CHARS>

source§

impl<const MAX_CHARS: usize> Decode<'_> for Bounded<String, MAX_CHARS>