pub struct CocoaBlock {
block: BlockRef,
}Expand description
Cocoa Block behavior
Fields§
§block: BlockRefImplementations§
Source§impl CocoaBlock
impl CocoaBlock
fn age(state: BlockStateId) -> u8
fn with_age(state: BlockStateId, age: u8) -> BlockStateId
Trait Implementations§
Source§impl BlockBehavior for CocoaBlock
impl BlockBehavior for CocoaBlock
Source§fn can_survive(
&self,
state: BlockStateId,
world: &dyn LevelReader,
pos: BlockPos,
) -> bool
fn can_survive( &self, state: BlockStateId, world: &dyn LevelReader, pos: BlockPos, ) -> bool
Returns whether this block can survive at the given position. Read more
Source§fn get_state_for_placement(
&self,
context: &BlockPlaceContext<'_>,
) -> Option<BlockStateId>
fn get_state_for_placement( &self, context: &BlockPlaceContext<'_>, ) -> Option<BlockStateId>
Returns the block state to use when placing this block.
Source§fn update_shape(
&self,
state: BlockStateId,
world: &dyn ScheduledTickAccess,
pos: BlockPos,
direction: Direction,
_neighbor_pos: BlockPos,
_neighbor_state: BlockStateId,
) -> BlockStateId
fn update_shape( &self, state: BlockStateId, world: &dyn ScheduledTickAccess, pos: BlockPos, direction: Direction, _neighbor_pos: BlockPos, _neighbor_state: BlockStateId, ) -> BlockStateId
Called when a neighboring block changes shape.
Returns the new state for this block after considering the neighbor change.
Implementations also own any block or fluid ticks that Vanilla schedules
from
updateShape; the world dispatcher does not infer them from the result.Source§fn is_pathfindable(
&self,
_state: BlockStateId,
_computation_type: PathComputationType,
) -> bool
fn is_pathfindable( &self, _state: BlockStateId, _computation_type: PathComputationType, ) -> bool
Returns whether this block state is pathfindable for the supplied vanilla path computation. Read more
Source§fn random_tick(&self, state: BlockStateId, world: &Arc<World>, pos: BlockPos)
fn random_tick(&self, state: BlockStateId, world: &Arc<World>, pos: BlockPos)
Called on random tick for blocks that support random ticking. Read more
Source§fn as_bonemealable(&self) -> Option<&dyn Bonemealable>
fn as_bonemealable(&self) -> Option<&dyn Bonemealable>
Returns the trait object for Blocks that have the Bonemealable trait implemented.
Source§fn get_clone_item_stack(
&self,
_block: BlockRef,
_state: BlockStateId,
_include_data: bool,
) -> Option<ItemStack>
fn get_clone_item_stack( &self, _block: BlockRef, _state: BlockStateId, _include_data: bool, ) -> Option<ItemStack>
Returns the item stack to give when a player picks this block (middle click). Read more
Source§fn type_name(&self) -> &'static str
fn type_name(&self) -> &'static str
Returns the Rust type name of the concrete behavior implementation.
Source§fn pickup_block(
&self,
world: &Arc<World>,
pos: BlockPos,
state: BlockStateId,
player: Option<&Player>,
) -> Option<PickupResult>
fn pickup_block( &self, world: &Arc<World>, pos: BlockPos, state: BlockStateId, player: Option<&Player>, ) -> Option<PickupResult>
Called when a player uses an empty bucket on this block. Read more
Source§fn update_indirect_neighbour_shapes(
&self,
state: BlockStateId,
world: &Arc<World>,
pos: BlockPos,
flags: UpdateFlags,
update_limit: i32,
)
fn update_indirect_neighbour_shapes( &self, state: BlockStateId, world: &Arc<World>, pos: BlockPos, flags: UpdateFlags, update_limit: i32, )
Queues indirect neighbor-shape updates after this state changes. Read more
Source§fn can_be_replaced(
&self,
state: BlockStateId,
context: &BlockPlaceContext<'_>,
) -> bool
fn can_be_replaced( &self, state: BlockStateId, context: &BlockPlaceContext<'_>, ) -> bool
Returns whether this block can be replaced by the held item during placement. Read more
Source§fn on_place(
&self,
state: BlockStateId,
world: &Arc<World>,
pos: BlockPos,
old_state: BlockStateId,
moved_by_piston: bool,
)
fn on_place( &self, state: BlockStateId, world: &Arc<World>, pos: BlockPos, old_state: BlockStateId, moved_by_piston: bool, )
Called when this block is placed in the world. Read more
Source§fn set_placed_by(
&self,
state: BlockStateId,
world: &Arc<World>,
pos: BlockPos,
source: &PlacementSource<'_>,
)
fn set_placed_by( &self, state: BlockStateId, world: &Arc<World>, pos: BlockPos, source: &PlacementSource<'_>, )
Called by block items after this block has been placed by an entity. Read more
Source§fn attack(
&self,
state: BlockStateId,
world: &Arc<World>,
pos: BlockPos,
player: &Player,
)
fn attack( &self, state: BlockStateId, world: &Arc<World>, pos: BlockPos, player: &Player, )
Called when a player starts attacking this block. Read more
Source§fn player_destroy(
&self,
world: &Arc<World>,
player: &Player,
pos: BlockPos,
state: BlockStateId,
block_entity: Option<&SharedBlockEntity>,
tool: &ItemStack,
)
fn player_destroy( &self, world: &Arc<World>, player: &Player, pos: BlockPos, state: BlockStateId, block_entity: Option<&SharedBlockEntity>, tool: &ItemStack, )
Called after a player destroys this block and drops/effects are processed. Read more
Source§fn player_will_destroy(
&self,
state: BlockStateId,
world: &Arc<World>,
pos: BlockPos,
player: &Player,
) -> BlockStateId
fn player_will_destroy( &self, state: BlockStateId, world: &Arc<World>, pos: BlockPos, player: &Player, ) -> BlockStateId
Called before a player removes this block. Read more
Source§fn destroy(&self, state: BlockStateId, world: &Arc<World>, pos: BlockPos)
fn destroy(&self, state: BlockStateId, world: &Arc<World>, pos: BlockPos)
Called after a player successfully removes this block. Read more
Source§fn get_drops(
&self,
state: BlockStateId,
context: &BlockLootContext<'_>,
) -> Option<Vec<ItemStack>>
fn get_drops( &self, state: BlockStateId, context: &BlockLootContext<'_>, ) -> Option<Vec<ItemStack>>
Overrides the loot generated for this block state. Read more
Source§fn spawn_after_break(
&self,
state: BlockStateId,
world: &Arc<World>,
pos: BlockPos,
tool: &ItemStack,
drop_experience: bool,
)
fn spawn_after_break( &self, state: BlockStateId, world: &Arc<World>, pos: BlockPos, tool: &ItemStack, drop_experience: bool, )
Called for post-break effects such as experience drops. Read more
Source§fn affect_neighbors_after_removal(
&self,
state: BlockStateId,
world: &Arc<World>,
pos: BlockPos,
moved_by_piston: bool,
)
fn affect_neighbors_after_removal( &self, state: BlockStateId, world: &Arc<World>, pos: BlockPos, moved_by_piston: bool, )
Called after this block is removed from the world, to affect neighbors. Read more
Source§fn use_item_on(
&self,
state: BlockStateId,
world: &Arc<World>,
pos: BlockPos,
player: &Player,
hand: InteractionHand,
hit_result: &BlockHitResult,
inv: &mut InventoryAccess,
) -> InteractionResult
fn use_item_on( &self, state: BlockStateId, world: &Arc<World>, pos: BlockPos, player: &Player, hand: InteractionHand, hit_result: &BlockHitResult, inv: &mut InventoryAccess, ) -> InteractionResult
Called when a player uses an item on this block. Read more
Source§fn use_without_item(
&self,
state: BlockStateId,
world: &Arc<World>,
pos: BlockPos,
player: &Player,
hit_result: &BlockHitResult,
inv: &mut InventoryAccess,
) -> InteractionResult
fn use_without_item( &self, state: BlockStateId, world: &Arc<World>, pos: BlockPos, player: &Player, hit_result: &BlockHitResult, inv: &mut InventoryAccess, ) -> InteractionResult
Called when a player uses this block without an item (or as a fallback
when
use_item_on returns TryEmptyHandInteraction). Read moreSource§fn handle_neighbor_changed(
&self,
state: BlockStateId,
world: &Arc<World>,
pos: BlockPos,
source_block: BlockRef,
moved_by_piston: bool,
)
fn handle_neighbor_changed( &self, state: BlockStateId, world: &Arc<World>, pos: BlockPos, source_block: BlockRef, moved_by_piston: bool, )
Called when a neighboring block changes (not shape-related). Read more
Source§fn is_signal_source(
&self,
_state: BlockStateId,
_context: SignalQueryContext,
) -> bool
fn is_signal_source( &self, _state: BlockStateId, _context: SignalQueryContext, ) -> bool
Returns whether this state is a redstone signal source.
Source§fn is_trapdoor(&self) -> bool
fn is_trapdoor(&self) -> bool
Returns whether this behavior implements vanilla
TrapDoorBlock semantics. Read moreSource§fn is_rail(&self) -> bool
fn is_rail(&self) -> bool
Returns whether this behavior implements vanilla
BaseRailBlock semantics.Source§fn is_piston_base(&self) -> bool
fn is_piston_base(&self) -> bool
Returns whether this behavior implements vanilla
PistonBaseBlock semantics.Source§fn get_own_signal(
&self,
_state: BlockStateId,
_world: &dyn LevelReader,
_pos: BlockPos,
_context: SignalQueryContext,
) -> i32
fn get_own_signal( &self, _state: BlockStateId, _world: &dyn LevelReader, _pos: BlockPos, _context: SignalQueryContext, ) -> i32
Returns this state’s direction-independent redstone signal strength.
Source§fn get_signal(
&self,
state: BlockStateId,
world: &dyn LevelReader,
pos: BlockPos,
_direction: Direction,
context: SignalQueryContext,
) -> i32
fn get_signal( &self, state: BlockStateId, world: &dyn LevelReader, pos: BlockPos, _direction: Direction, context: SignalQueryContext, ) -> i32
Returns the weak redstone signal emitted toward
direction.Source§fn get_direct_signal(
&self,
_state: BlockStateId,
_world: &dyn LevelReader,
_pos: BlockPos,
_direction: Direction,
_context: SignalQueryContext,
) -> i32
fn get_direct_signal( &self, _state: BlockStateId, _world: &dyn LevelReader, _pos: BlockPos, _direction: Direction, _context: SignalQueryContext, ) -> i32
Returns the direct redstone signal emitted toward
direction.Source§fn is_redstone_conductor(
&self,
state: BlockStateId,
_world: &dyn LevelReader,
_pos: BlockPos,
) -> bool
fn is_redstone_conductor( &self, state: BlockStateId, _world: &dyn LevelReader, _pos: BlockPos, ) -> bool
Returns whether this state conducts direct redstone power through itself. Read more
Source§fn trigger_event(
&self,
state: BlockStateId,
world: &Arc<World>,
pos: BlockPos,
param_a: i32,
param_b: i32,
) -> bool
fn trigger_event( &self, state: BlockStateId, world: &Arc<World>, pos: BlockPos, param_a: i32, param_b: i32, ) -> bool
Handles a queued server block event. Read more
Source§fn is_wooden_door(&self, state: BlockStateId) -> bool
fn is_wooden_door(&self, state: BlockStateId) -> bool
Mirrors vanilla
DoorBlock.isWoodenDoor. Read moreSource§fn set_door_open(
&self,
state: BlockStateId,
world: &Arc<World>,
pos: BlockPos,
source_entity: Option<&dyn Entity>,
open: bool,
) -> bool
fn set_door_open( &self, state: BlockStateId, world: &Arc<World>, pos: BlockPos, source_entity: Option<&dyn Entity>, open: bool, ) -> bool
Mirrors vanilla
DoorBlock.setOpen for AI door goals.Source§fn default_get_collision_shape(
&self,
state: BlockStateId,
world: &dyn LevelReader,
pos: BlockPos,
context: BlockCollisionContext,
) -> VoxelShape
fn default_get_collision_shape( &self, state: BlockStateId, world: &dyn LevelReader, pos: BlockPos, context: BlockCollisionContext, ) -> VoxelShape
Returns this block state’s collision shape for the supplied collision context. Read more
Source§fn get_collision_shape(
&self,
state: BlockStateId,
world: &dyn LevelReader,
pos: BlockPos,
context: BlockCollisionContext,
) -> VoxelShape
fn get_collision_shape( &self, state: BlockStateId, world: &dyn LevelReader, pos: BlockPos, context: BlockCollisionContext, ) -> VoxelShape
Returns this block state’s collision shape for the supplied collision context. Read more
Source§fn get_collision_shape_offset(
&self,
state: BlockStateId,
world: &dyn LevelReader,
pos: BlockPos,
context: BlockCollisionContext,
) -> DVec3
fn get_collision_shape_offset( &self, state: BlockStateId, world: &dyn LevelReader, pos: BlockPos, context: BlockCollisionContext, ) -> DVec3
Returns a block-local translation for this block state’s collision shape. Read more
Source§fn get_collision_boxes(
&self,
state: BlockStateId,
world: &dyn LevelReader,
pos: BlockPos,
context: BlockCollisionContext,
) -> BlockCollisionBoxes
fn get_collision_boxes( &self, state: BlockStateId, world: &dyn LevelReader, pos: BlockPos, context: BlockCollisionContext, ) -> BlockCollisionBoxes
Resolves this block state’s collision shape to owned block-local boxes. Read more
Source§fn get_block_support_boxes(
&self,
state: BlockStateId,
world: &dyn LevelReader,
pos: BlockPos,
) -> BlockCollisionBoxes
fn get_block_support_boxes( &self, state: BlockStateId, world: &dyn LevelReader, pos: BlockPos, ) -> BlockCollisionBoxes
Resolves vanilla
BlockState.getBlockSupportShape to owned block-local boxes. Read moreSource§fn is_face_sturdy(
&self,
state: BlockStateId,
world: &dyn LevelReader,
pos: BlockPos,
direction: Direction,
support_type: SupportType,
) -> bool
fn is_face_sturdy( &self, state: BlockStateId, world: &dyn LevelReader, pos: BlockPos, direction: Direction, support_type: SupportType, ) -> bool
Mirrors vanilla
BlockState.isFaceSturdy(level, pos, direction, supportType). Read moreSource§fn default_get_entity_inside_collision_shape(
&self,
state: BlockStateId,
world: &dyn LevelReader,
pos: BlockPos,
entity: &dyn Entity,
) -> VoxelShape
fn default_get_entity_inside_collision_shape( &self, state: BlockStateId, world: &dyn LevelReader, pos: BlockPos, entity: &dyn Entity, ) -> VoxelShape
Returns this block state’s shape used by vanilla entity-inside effects. Read more
Source§fn get_entity_inside_collision_shape(
&self,
state: BlockStateId,
world: &dyn LevelReader,
pos: BlockPos,
entity: &dyn Entity,
) -> VoxelShape
fn get_entity_inside_collision_shape( &self, state: BlockStateId, world: &dyn LevelReader, pos: BlockPos, entity: &dyn Entity, ) -> VoxelShape
Returns this block state’s shape used by vanilla entity-inside effects.
Source§fn tick(&self, state: BlockStateId, world: &Arc<World>, pos: BlockPos)
fn tick(&self, state: BlockStateId, world: &Arc<World>, pos: BlockPos)
Called when a scheduled tick fires for this block. Read more
Source§fn on_projectile_hit(
&self,
_state: BlockStateId,
_world: &Arc<World>,
_hit: &ClipHitResult,
_projectile: &dyn Projectile,
)
fn on_projectile_hit( &self, _state: BlockStateId, _world: &Arc<World>, _hit: &ClipHitResult, _projectile: &dyn Projectile, )
Called when a projectile hits this block. Read more
Source§fn default_entity_inside(
&self,
state: BlockStateId,
world: &Arc<World>,
pos: BlockPos,
entity: &dyn Entity,
effect_collector: &mut InsideBlockEffectCollector,
is_precise: bool,
)
fn default_entity_inside( &self, state: BlockStateId, world: &Arc<World>, pos: BlockPos, entity: &dyn Entity, effect_collector: &mut InsideBlockEffectCollector, is_precise: bool, )
Default entity-inside hook. Read more
Source§fn entity_inside(
&self,
state: BlockStateId,
world: &Arc<World>,
pos: BlockPos,
entity: &dyn Entity,
effect_collector: &mut InsideBlockEffectCollector,
is_precise: bool,
)
fn entity_inside( &self, state: BlockStateId, world: &Arc<World>, pos: BlockPos, entity: &dyn Entity, effect_collector: &mut InsideBlockEffectCollector, is_precise: bool, )
Called when an entity is inside this block’s collision area. Read more
Source§fn default_fall_on(
&self,
state: BlockStateId,
world: &Arc<World>,
pos: BlockPos,
context: EntityFallOnContext<'_>,
) -> Option<EntityFallDamage>
fn default_fall_on( &self, state: BlockStateId, world: &Arc<World>, pos: BlockPos, context: EntityFallOnContext<'_>, ) -> Option<EntityFallDamage>
Default fall-on hook. Read more
Source§fn fall_on(
&self,
state: BlockStateId,
world: &Arc<World>,
pos: BlockPos,
context: EntityFallOnContext<'_>,
) -> Option<EntityFallDamage>
fn fall_on( &self, state: BlockStateId, world: &Arc<World>, pos: BlockPos, context: EntityFallOnContext<'_>, ) -> Option<EntityFallDamage>
Called when an entity lands on this block. Read more
Source§fn after_fall_on_damage(
&self,
state: BlockStateId,
world: &Arc<World>,
pos: BlockPos,
entity: &dyn Entity,
fall_damage: &EntityFallDamage,
damage_applied: bool,
)
fn after_fall_on_damage( &self, state: BlockStateId, world: &Arc<World>, pos: BlockPos, entity: &dyn Entity, fall_damage: &EntityFallDamage, damage_applied: bool, )
Called after fall damage requested by
BlockBehavior::fall_on is applied. Read moreSource§fn default_update_entity_movement_after_fall_on(
&self,
state: BlockStateId,
world: &Arc<World>,
pos: BlockPos,
context: EntityLandingContext,
) -> DVec3
fn default_update_entity_movement_after_fall_on( &self, state: BlockStateId, world: &Arc<World>, pos: BlockPos, context: EntityLandingContext, ) -> DVec3
Default post-fall movement hook. Read more
Source§fn update_entity_movement_after_fall_on(
&self,
state: BlockStateId,
world: &Arc<World>,
pos: BlockPos,
context: EntityLandingContext,
) -> DVec3
fn update_entity_movement_after_fall_on( &self, state: BlockStateId, world: &Arc<World>, pos: BlockPos, context: EntityLandingContext, ) -> DVec3
Updates entity velocity after a vertical movement collision with this block. Read more
Source§fn default_step_on(
&self,
state: BlockStateId,
world: &Arc<World>,
pos: BlockPos,
entity: &dyn Entity,
)
fn default_step_on( &self, state: BlockStateId, world: &Arc<World>, pos: BlockPos, entity: &dyn Entity, )
Default step-on hook. Read more
Source§fn step_on(
&self,
state: BlockStateId,
world: &Arc<World>,
pos: BlockPos,
entity: &dyn Entity,
)
fn step_on( &self, state: BlockStateId, world: &Arc<World>, pos: BlockPos, entity: &dyn Entity, )
Called when an entity steps on this block while on ground. Read more
Source§fn new_block_entity(
&self,
level: Weak<World>,
pos: BlockPos,
state: BlockStateId,
) -> BlockEntityCreation
fn new_block_entity( &self, level: Weak<World>, pos: BlockPos, state: BlockStateId, ) -> BlockEntityCreation
Creates a new block entity for this block. Read more
Source§fn get_block_entity_ticker(
&self,
world: &Arc<World>,
state: BlockStateId,
block_entity_type: BlockEntityTypeRef,
) -> Option<BlockEntityTicker>
fn get_block_entity_ticker( &self, world: &Arc<World>, state: BlockStateId, block_entity_type: BlockEntityTypeRef, ) -> Option<BlockEntityTicker>
Returns the server ticker selected by this live block state and entity type. Read more
Source§fn get_game_event_listener(
&self,
world: &Arc<World>,
block_entity: &dyn BlockEntity,
) -> Option<SharedGameEventListener>
fn get_game_event_listener( &self, world: &Arc<World>, block_entity: &dyn BlockEntity, ) -> Option<SharedGameEventListener>
Returns the game-event listener exposed by this block entity. Read more
Source§fn should_keep_block_entity(
&self,
old_state: BlockStateId,
new_state: BlockStateId,
) -> bool
fn should_keep_block_entity( &self, old_state: BlockStateId, new_state: BlockStateId, ) -> bool
Returns whether this new block should keep the old state’s block entity. Read more
Source§fn has_analog_output_signal(&self, state: BlockStateId) -> bool
fn has_analog_output_signal(&self, state: BlockStateId) -> bool
Returns whether this block can provide an analog output signal to comparators. Read more
Source§fn get_analog_output_signal(
&self,
state: BlockStateId,
world: &dyn LevelReader,
pos: BlockPos,
direction: Direction,
) -> i32
fn get_analog_output_signal( &self, state: BlockStateId, world: &dyn LevelReader, pos: BlockPos, direction: Direction, ) -> i32
Returns the analog output signal strength (0-15) for comparators. Read more
Source§fn is_liquid_container(&self, state: BlockStateId) -> bool
fn is_liquid_container(&self, state: BlockStateId) -> bool
Vanilla parity: whether this block implements
LiquidBlockContainer. Read moreSource§fn can_place_liquid(&self, state: BlockStateId, fluid: FluidRef) -> bool
fn can_place_liquid(&self, state: BlockStateId, fluid: FluidRef) -> bool
Vanilla parity:
LiquidBlockContainer.canPlaceLiquid(). Read moreSource§fn can_place_liquid_with_player(
&self,
state: BlockStateId,
fluid: FluidRef,
_player: Option<&Player>,
) -> bool
fn can_place_liquid_with_player( &self, state: BlockStateId, fluid: FluidRef, _player: Option<&Player>, ) -> bool
Vanilla parity:
LiquidBlockContainer.canPlaceLiquid() with a user. Read moreSource§fn can_be_replaced_by_fluid(
&self,
state: BlockStateId,
_fluid_block: BlockRef,
) -> bool
fn can_be_replaced_by_fluid( &self, state: BlockStateId, _fluid_block: BlockRef, ) -> bool
Vanilla parity:
BlockBehaviour.BlockStateBase.canBeReplaced(Fluid). Read moreSource§fn place_liquid(
&self,
level: &dyn LevelAccessor,
pos: BlockPos,
state: BlockStateId,
fluid_state: FluidState,
) -> bool
fn place_liquid( &self, level: &dyn LevelAccessor, pos: BlockPos, state: BlockStateId, fluid_state: FluidState, ) -> bool
Vanilla parity:
LiquidBlockContainer.placeLiquid(). Read moreSource§fn as_rail(&self) -> Option<&dyn RailBehavior>
fn as_rail(&self) -> Option<&dyn RailBehavior>
Returns the shared vanilla rail capability implemented by this block.
Source§impl Bonemealable for CocoaBlock
impl Bonemealable for CocoaBlock
Source§fn is_valid_bonemeal_target(
&self,
state: BlockStateId,
_world: &dyn LevelReader,
_pos: BlockPos,
) -> bool
fn is_valid_bonemeal_target( &self, state: BlockStateId, _world: &dyn LevelReader, _pos: BlockPos, ) -> bool
Returns whether this block is a valid bonemeal target.
Source§fn perform_bonemeal(
&self,
state: BlockStateId,
world: &Arc<World>,
_rng: &mut dyn Rng,
pos: BlockPos,
)
fn perform_bonemeal( &self, state: BlockStateId, world: &Arc<World>, _rng: &mut dyn Rng, pos: BlockPos, )
Applies the bonemeal effect.
Source§fn get_bonemeal_age_increase(
&self,
_world: &Arc<World>,
_rng: &mut dyn Rng,
) -> u8
fn get_bonemeal_age_increase( &self, _world: &Arc<World>, _rng: &mut dyn Rng, ) -> u8
Returns the age increase from bonemeal.
Source§fn is_bonemeal_success(
&self,
_state: BlockStateId,
_world: &Arc<World>,
_rng: &mut dyn Rng,
_pos: BlockPos,
) -> bool
fn is_bonemeal_success( &self, _state: BlockStateId, _world: &Arc<World>, _rng: &mut dyn Rng, _pos: BlockPos, ) -> bool
Returns whether bonemeal succeeds after the target check passes.
Source§fn bonemeal_action_type(&self) -> BonemealAction
fn bonemeal_action_type(&self) -> BonemealAction
Returns how this block uses bonemeal.
Auto Trait Implementations§
impl !RefUnwindSafe for CocoaBlock
impl !UnwindSafe for CocoaBlock
impl Freeze for CocoaBlock
impl Send for CocoaBlock
impl Sync for CocoaBlock
impl Unpin for CocoaBlock
impl UnsafeUnpin for CocoaBlock
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreWraps this value in an
Arc<SyncMutex<>>