Trait valence::protocol::Decode

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§

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§

§

impl Decode<'_> for bool

§

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

§

impl Decode<'_> for f32

§

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

§

impl Decode<'_> for f64

§

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

§

impl Decode<'_> for i8

§

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

§

impl Decode<'_> for i16

§

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

§

impl Decode<'_> for i32

§

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

§

impl Decode<'_> for i64

§

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

§

impl Decode<'_> for i128

§

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

§

impl Decode<'_> for u8

§

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

§

impl Decode<'_> for u16

§

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

§

impl Decode<'_> for u32

§

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

§

impl Decode<'_> for u64

§

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

§

impl Decode<'_> for u128

§

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

§

impl Decode<'_> for Box<str>

§

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

§

impl Decode<'_> for String

§

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

§

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

§

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

§

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

§

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

§

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

§

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

§

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

§

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

§

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

§

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

§

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

§

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

§

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

§

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

§

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

§

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

§

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>,

§

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

§

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>,

§

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

§

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>,

§

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

§

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>,

§

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

§

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>,

§

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>,

§

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>,

§

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>,

§

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>,

§

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

§

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

§

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

§

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

§

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

§

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

§

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

§

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

§

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

§

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

§

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

§

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

§

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

§

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

§

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

§

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

§

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

§

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

§

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

§

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

§

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

§

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

§

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

References to fixed-length arrays are not length prefixed.

§

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

Implementors§

§

impl Decode<'_> for BlockKind

§

impl Decode<'_> for ItemKind

§

impl Decode<'_> for VillagerData

§

impl Decode<'_> for DQuat

§

impl Decode<'_> for DVec2

§

impl Decode<'_> for DVec3

§

impl Decode<'_> for IVec3

§

impl Decode<'_> for Quat

§

impl Decode<'_> for Vec2

§

impl Decode<'_> for Vec3

§

impl Decode<'_> for Vec3A

§

impl Decode<'_> for Vec4

§

impl Decode<'_> for Compound

§

impl Decode<'_> for OptGameMode

§

impl Decode<'_> for ChunkDeltaUpdateEntry

§

impl Decode<'_> for BlockPos

§

impl Decode<'_> for BlockState

§

impl Decode<'_> for ByteAngle

§

impl Decode<'_> for ChunkSectionPos

§

impl Decode<'_> for ItemStack

§

impl Decode<'_> for Text

§

impl Decode<'_> for VarInt

§

impl Decode<'_> for VarLong

§

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

§

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

§

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

§

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

§

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

§

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

§

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

§

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

§

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

§

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

§

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

§

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

§

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

§

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

§

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

§

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

§

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

§

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

§

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

§

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

§

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

§

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

§

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

§

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

§

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

§

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

§

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

§

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

§

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

§

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

§

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

§

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

§

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

§

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

§

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

§

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

§

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

§

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

§

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

§

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

§

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

§

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

§

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

§

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

§

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

§

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

§

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

§

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

§

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

§

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

§

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

§

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

§

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

§

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

§

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

§

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

§

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

§

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

§

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

§

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

§

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

§

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

§

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

§

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

§

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

§

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

§

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

§

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

§

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

§

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

§

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

§

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

§

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

§

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

§

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

§

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

§

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

§

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

§

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

§

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

§

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

§

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

§

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

§

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

§

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

§

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

§

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

§

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

§

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

§

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

§

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

§

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

§

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

§

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

§

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

§

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

§

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

§

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

§

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

§

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

§

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

§

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

§

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

§

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

§

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

§

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

§

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

§

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

§

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

§

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

§

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

§

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

§

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

§

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

§

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

§

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

§

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

§

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

§

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

§

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

§

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

§

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

§

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

§

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

§

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

§

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

§

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

§

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

§

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

§

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

§

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

§

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

§

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

§

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

§

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

§

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

§

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

§

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

§

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

§

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

§

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

§

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

§

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

§

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

§

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

§

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

§

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

§

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

§

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

§

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

§

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

§

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

§

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

§

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

§

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

§

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

§

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

§

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

§

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

§

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

§

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

§

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

§

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

§

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

§

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

§

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

§

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

§

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

§

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

§

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

§

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

§

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

§

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

§

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

§

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

§

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

§

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

§

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

§

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

§

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

§

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

§

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

§

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

§

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

§

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

§

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

§

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

§

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

§

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

§

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

§

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

§

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

§

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

§

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

§

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

§

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

§

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

§

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

§

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

§

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

§

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

§

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

§

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

§

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

§

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

§

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

§

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

§

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

§

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

§

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

§

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

§

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

§

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

§

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

§

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

§

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

§

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

§

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

§

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

§

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

§

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

§

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

§

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

§

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

§

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

§

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

§

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

§

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

§

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

§

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

§

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

§

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

§

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

§

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

§

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

§

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

§

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

§

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

§

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

§

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

§

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

§

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

§

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

§

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

§

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

§

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

§

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

§

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

§

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

§

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

§

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

§

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

§

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

§

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

§

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

§

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

§

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

§

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

§

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

§

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

§

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

§

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

§

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.

§

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

§

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

§

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

§

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

§

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