pub trait SignApplicator: Send + Sync {
// Required method
fn try_apply_to_sign(
&self,
world: &World,
sign: &SignBlockEntity,
slot: SignTextSlot,
item: &ItemStack,
player: &Player,
) -> bool;
// Provided method
fn can_apply_to_sign(
&self,
text: &SignText,
_item: &ItemStack,
_player: &Player,
) -> bool { ... }
}Expand description
Item capability applied by a sign before its editor fallback.
Required Methods§
Sourcefn try_apply_to_sign(
&self,
world: &World,
sign: &SignBlockEntity,
slot: SignTextSlot,
item: &ItemStack,
player: &Player,
) -> bool
fn try_apply_to_sign( &self, world: &World, sign: &SignBlockEntity, slot: SignTextSlot, item: &ItemStack, player: &Player, ) -> bool
Applies the change; the sign handles consumption, statistics and updates.
Provided Methods§
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".