Trait Wire
pub trait Wire: Sized {
const MIN: usize;
// Required methods
fn put(&self, out: &mut Writer);
fn take(input: &mut Reader<'_>) -> Result<Self, WireError>;
// Provided method
fn put_owned(self, out: &mut Writer) { ... }
}Expand description
A type with a wire form.
Required Associated Constants§
Required Methods§
Provided Methods§
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".
Implementations on Foreign Types§
§impl Wire for Arc<dyn BiomeColorResolver>
impl Wire for Arc<dyn BiomeColorResolver>
§impl Wire for Arc<dyn BlockCapabilityProvider<dyn EnergyHandler>>
impl Wire for Arc<dyn BlockCapabilityProvider<dyn EnergyHandler>>
§impl Wire for Arc<dyn BlockCapabilityProvider<dyn ResourceHandler<FluidResource>>>
impl Wire for Arc<dyn BlockCapabilityProvider<dyn ResourceHandler<FluidResource>>>
const MIN: usize = 8
fn put(&self, out: &mut Writer)
fn take( input: &mut Reader<'_>, ) -> Result<Arc<dyn BlockCapabilityProvider<dyn ResourceHandler<FluidResource>>>, WireError>
§impl Wire for Arc<dyn BlockCapabilityProvider<dyn ResourceHandler<ItemResource>>>
impl Wire for Arc<dyn BlockCapabilityProvider<dyn ResourceHandler<ItemResource>>>
const MIN: usize = 8
fn put(&self, out: &mut Writer)
fn take( input: &mut Reader<'_>, ) -> Result<Arc<dyn BlockCapabilityProvider<dyn ResourceHandler<ItemResource>>>, WireError>
§impl Wire for Arc<dyn BlockEntityPart>
impl Wire for Arc<dyn BlockEntityPart>
§impl Wire for Arc<dyn BlockTintSource>
impl Wire for Arc<dyn BlockTintSource>
§impl Wire for Arc<dyn ClientReloadListener>
impl Wire for Arc<dyn ClientReloadListener>
§impl Wire for Arc<dyn CommandArgumentType>
impl Wire for Arc<dyn CommandArgumentType>
§impl Wire for Arc<dyn CriterionTest>
impl Wire for Arc<dyn CriterionTest>
§impl Wire for Arc<dyn EnchantmentDamageEffect>
impl Wire for Arc<dyn EnchantmentDamageEffect>
§impl Wire for Arc<dyn EnergyHandler>
impl Wire for Arc<dyn EnergyHandler>
§impl Wire for Arc<dyn EntityCapabilityProvider<dyn EnergyHandler, Option<Direction>>>
impl Wire for Arc<dyn EntityCapabilityProvider<dyn EnergyHandler, Option<Direction>>>
§impl Wire for Arc<dyn EntityCapabilityProvider<dyn ResourceHandler<FluidResource>, Option<Direction>>>
impl Wire for Arc<dyn EntityCapabilityProvider<dyn ResourceHandler<FluidResource>, Option<Direction>>>
§impl Wire for Arc<dyn EntityCapabilityProvider<dyn ResourceHandler<ItemResource>, ()>>
impl Wire for Arc<dyn EntityCapabilityProvider<dyn ResourceHandler<ItemResource>, ()>>
§impl Wire for Arc<dyn EntityCapabilityProvider<dyn ResourceHandler<ItemResource>, Option<Direction>>>
impl Wire for Arc<dyn EntityCapabilityProvider<dyn ResourceHandler<ItemResource>, Option<Direction>>>
§impl Wire for Arc<dyn GameTestFunction>
impl Wire for Arc<dyn GameTestFunction>
§impl Wire for Arc<dyn GroundStateProvider>
impl Wire for Arc<dyn GroundStateProvider>
§impl Wire for Arc<dyn Interaction>
impl Wire for Arc<dyn Interaction>
§impl Wire for Arc<dyn ItemCapabilityProvider<dyn EnergyHandler>>
impl Wire for Arc<dyn ItemCapabilityProvider<dyn EnergyHandler>>
§impl Wire for Arc<dyn ItemCapabilityProvider<dyn ResourceHandler<FluidResource>>>
impl Wire for Arc<dyn ItemCapabilityProvider<dyn ResourceHandler<FluidResource>>>
const MIN: usize = 8
fn put(&self, out: &mut Writer)
fn take( input: &mut Reader<'_>, ) -> Result<Arc<dyn ItemCapabilityProvider<dyn ResourceHandler<FluidResource>>>, WireError>
§impl Wire for Arc<dyn ItemCapabilityProvider<dyn ResourceHandler<ItemResource>>>
impl Wire for Arc<dyn ItemCapabilityProvider<dyn ResourceHandler<ItemResource>>>
const MIN: usize = 8
fn put(&self, out: &mut Writer)
fn take( input: &mut Reader<'_>, ) -> Result<Arc<dyn ItemCapabilityProvider<dyn ResourceHandler<ItemResource>>>, WireError>
§impl Wire for Arc<dyn ParticleProvider>
impl Wire for Arc<dyn ParticleProvider>
§impl Wire for Arc<dyn PlaceProvider>
impl Wire for Arc<dyn PlaceProvider>
§impl Wire for Arc<dyn ReloadApply>
impl Wire for Arc<dyn ReloadApply>
§impl Wire for Arc<dyn ResourceHandler<FluidResource>>
impl Wire for Arc<dyn ResourceHandler<FluidResource>>
§impl Wire for Arc<dyn ResourceHandler<ItemResource>>
impl Wire for Arc<dyn ResourceHandler<ItemResource>>
§impl Wire for Arc<dyn SectionGeometry>
impl Wire for Arc<dyn SectionGeometry>
§impl Wire for Arc<dyn ServerReloadListener>
impl Wire for Arc<dyn ServerReloadListener>
§impl Wire for Arc<dyn StructurePiece>
impl Wire for Arc<dyn StructurePiece>
§impl Wire for Arc<dyn StructureType>
impl Wire for Arc<dyn StructureType>
§impl Wire for Arc<dyn TooltipAppender>
impl Wire for Arc<dyn TooltipAppender>
§impl Wire for Box<dyn BiomeColorResolver>
impl Wire for Box<dyn BiomeColorResolver>
§impl Wire for Box<dyn BlockCapabilityProvider<dyn EnergyHandler>>
impl Wire for Box<dyn BlockCapabilityProvider<dyn EnergyHandler>>
§impl Wire for Box<dyn BlockCapabilityProvider<dyn ResourceHandler<FluidResource>>>
impl Wire for Box<dyn BlockCapabilityProvider<dyn ResourceHandler<FluidResource>>>
§impl Wire for Box<dyn BlockCapabilityProvider<dyn ResourceHandler<ItemResource>>>
impl Wire for Box<dyn BlockCapabilityProvider<dyn ResourceHandler<ItemResource>>>
§impl Wire for Box<dyn BlockEntityPart>
impl Wire for Box<dyn BlockEntityPart>
§impl Wire for Box<dyn BlockTintSource>
impl Wire for Box<dyn BlockTintSource>
§impl Wire for Box<dyn ClientReloadListener>
impl Wire for Box<dyn ClientReloadListener>
§impl Wire for Box<dyn CommandArgumentType>
impl Wire for Box<dyn CommandArgumentType>
§impl Wire for Box<dyn CriterionTest>
impl Wire for Box<dyn CriterionTest>
§impl Wire for Box<dyn EnchantmentDamageEffect>
impl Wire for Box<dyn EnchantmentDamageEffect>
§impl Wire for Box<dyn EnergyHandler>
impl Wire for Box<dyn EnergyHandler>
§impl Wire for Box<dyn EntityCapabilityProvider<dyn EnergyHandler, Option<Direction>>>
impl Wire for Box<dyn EntityCapabilityProvider<dyn EnergyHandler, Option<Direction>>>
§impl Wire for Box<dyn EntityCapabilityProvider<dyn ResourceHandler<FluidResource>, Option<Direction>>>
impl Wire for Box<dyn EntityCapabilityProvider<dyn ResourceHandler<FluidResource>, Option<Direction>>>
§impl Wire for Box<dyn EntityCapabilityProvider<dyn ResourceHandler<ItemResource>, ()>>
impl Wire for Box<dyn EntityCapabilityProvider<dyn ResourceHandler<ItemResource>, ()>>
§impl Wire for Box<dyn EntityCapabilityProvider<dyn ResourceHandler<ItemResource>, Option<Direction>>>
impl Wire for Box<dyn EntityCapabilityProvider<dyn ResourceHandler<ItemResource>, Option<Direction>>>
§impl Wire for Box<dyn GameTestFunction>
impl Wire for Box<dyn GameTestFunction>
§impl Wire for Box<dyn GroundStateProvider>
impl Wire for Box<dyn GroundStateProvider>
§impl Wire for Box<dyn Interaction>
impl Wire for Box<dyn Interaction>
§impl Wire for Box<dyn ItemCapabilityProvider<dyn EnergyHandler>>
impl Wire for Box<dyn ItemCapabilityProvider<dyn EnergyHandler>>
§impl Wire for Box<dyn ItemCapabilityProvider<dyn ResourceHandler<FluidResource>>>
impl Wire for Box<dyn ItemCapabilityProvider<dyn ResourceHandler<FluidResource>>>
§impl Wire for Box<dyn ItemCapabilityProvider<dyn ResourceHandler<ItemResource>>>
impl Wire for Box<dyn ItemCapabilityProvider<dyn ResourceHandler<ItemResource>>>
§impl Wire for Box<dyn ParticleProvider>
impl Wire for Box<dyn ParticleProvider>
§impl Wire for Box<dyn PlaceProvider>
impl Wire for Box<dyn PlaceProvider>
§impl Wire for Box<dyn ReloadApply>
impl Wire for Box<dyn ReloadApply>
§impl Wire for Box<dyn ResourceHandler<FluidResource>>
impl Wire for Box<dyn ResourceHandler<FluidResource>>
§impl Wire for Box<dyn ResourceHandler<ItemResource>>
impl Wire for Box<dyn ResourceHandler<ItemResource>>
§impl Wire for Box<dyn SectionGeometry>
impl Wire for Box<dyn SectionGeometry>
§impl Wire for Box<dyn ServerReloadListener>
impl Wire for Box<dyn ServerReloadListener>
§impl Wire for Box<dyn StructurePiece>
impl Wire for Box<dyn StructurePiece>
§impl Wire for Box<dyn StructureType>
impl Wire for Box<dyn StructureType>
§impl Wire for Box<dyn TooltipAppender>
impl Wire for Box<dyn TooltipAppender>
§impl Wire for Cow<'_, str>
A mod’s own text, owned once read: a Cow<'static, str> field is how the API takes either.
impl Wire for Cow<'_, str>
A mod’s own text, owned once read: a Cow<'static, str> field is how the API takes either.
§impl Wire for JavaString
An NBT key: UTF-16 units, in the bytes of a Vec<u16> but written and read in one pass.
impl Wire for JavaString
An NBT key: UTF-16 units, in the bytes of a Vec<u16> but written and read in one pass.
§impl<A, B, C, D, E, F> Wire for (A, B, C, D, E, F)
impl<A, B, C, D, E, F> Wire for (A, B, C, D, E, F)
§impl<A, B, C, D, E> Wire for (A, B, C, D, E)
impl<A, B, C, D, E> Wire for (A, B, C, D, E)
§impl<A, B, C, D> Wire for (A, B, C, D)
impl<A, B, C, D> Wire for (A, B, C, D)
Implementors§
§impl Wire for HiddenPartswhere
HiddenPartsWire: Wire + for<'__wire> From<&'__wire HiddenParts>,
HiddenParts: TryFrom<HiddenPartsWire>,
impl Wire for HiddenPartswhere
HiddenPartsWire: Wire + for<'__wire> From<&'__wire HiddenParts>,
HiddenParts: TryFrom<HiddenPartsWire>,
§impl Wire for LegacyRandom
The whole generator, through its own constructor, which masks the state to 48 bits.
impl Wire for LegacyRandom
The whole generator, through its own constructor, which masks the state to 48 bits.