Skip to main content

RemoveOnDisconnectBundle

Struct RemoveOnDisconnectBundle 

Source
pub struct RemoveOnDisconnectBundle {
    pub joined_client: JoinedClientBundle,
    pub entity: EntityBundle,
    pub world_holder: WorldHolder,
    pub player_metadata: PlayerMetadataBundle,
    pub in_loaded_chunk: InLoadedChunk,
    pub raw_connection: RawConnection,
    pub is_connection_alive: IsConnectionAlive,
    pub chat_signing_session: ChatSigningSession,
    pub is_authenticated: IsAuthenticated,
    pub has_client_loaded: HasClientLoaded,
    pub ticks_alive: TicksConnected,
    pub mining: Mining,
}
Expand description

A bundle of components that are removed when a client disconnects.

This shouldn’t be used for inserts because not all of the components should always be present.

Fields§

§joined_client: JoinedClientBundle§entity: EntityBundle§world_holder: WorldHolder§player_metadata: PlayerMetadataBundle§in_loaded_chunk: InLoadedChunk§raw_connection: RawConnection§is_connection_alive: IsConnectionAlive

This makes it not send DisconnectEvent again.

§chat_signing_session: ChatSigningSession

Resend our chat signing certs next time.

§is_authenticated: IsAuthenticated

They’re not authenticated anymore if they disconnected.

§has_client_loaded: HasClientLoaded§ticks_alive: TicksConnected§mining: Mining

Trait Implementations§

Source§

impl Bundle for RemoveOnDisconnectBundle

Source§

fn get_component_ids( components: &Components, ) -> impl Iterator<Item = Option<ComponentId>>

Returns an iterator over this [Bundle]’s component ids. This will be None if the component has not been registered.
Source§

impl BundleFromComponents for RemoveOnDisconnectBundle

Source§

impl DynamicBundle for RemoveOnDisconnectBundle

Source§

type Effect = ()

An operation on the entity that happens after inserting this bundle.
Source§

unsafe fn get_components( ptr: MovingPtr<'_, RemoveOnDisconnectBundle>, func: &mut impl FnMut(StorageType, OwningPtr<'_>), )

Moves the components out of the bundle. Read more
Source§

unsafe fn apply_effect( ptr: MovingPtr<'_, MaybeUninit<RemoveOnDisconnectBundle>>, func: &mut EntityWorldMut<'_>, )

Applies the after-effects of spawning this bundle. Read more

Auto Trait Implementations§

§

impl !RefUnwindSafe for RemoveOnDisconnectBundle

§

impl !UnwindSafe for RemoveOnDisconnectBundle

§

impl Forget for RemoveOnDisconnectBundle

§

impl Freeze for RemoveOnDisconnectBundle
where *const Menu is !null: Freeze, PhantomData<Menu>: Freeze, *const FormattedText is !null: Freeze, PhantomData<FormattedText>: Freeze, *const IndexMap<DataComponentKind, Option<DataComponent>> is !null: Freeze, PhantomData<IndexMap<DataComponentKind, Option<DataComponent>>>: Freeze, *const u8 is !null: Freeze, PhantomData<(u16, ())>: Freeze, PhantomData<(Uuid, PlayerInfo)>: Freeze, PhantomData<(BlockPos, ServerVerifiedState)>: Freeze, PhantomData<(BlockPos, BlockState)>: Freeze, PhantomData<(Identifier, Vec<u8>)>: Freeze, PhantomData<fn() -> NoHashHasher<MinecraftEntityId>>: Freeze, PhantomData<(MinecraftEntityId, Entity)>: Freeze, PhantomData<(Entity, MinecraftEntityId)>: Freeze, NonZero<usize>: Freeze, *const str is !null: Freeze, PhantomData<str>: Freeze, &'static str: Freeze, PhantomData<(Identifier, AttributeModifier)>: Freeze, PhantomData<(MobEffect, MobEffectData)>: Freeze, *const ArcInner<RwLock<RawRwLock, PartialWorld>> is !null: Freeze, PhantomData<ArcInner<RwLock<RawRwLock, PartialWorld>>>: Freeze, *const ArcInner<RwLock<RawRwLock, World>> is !null: Freeze, PhantomData<ArcInner<RwLock<RawRwLock, World>>>: Freeze, *const [EntityParticle] is !null: Freeze, PhantomData<[EntityParticle]>: Freeze, *const ArcInner<TcpStream> is !null: Freeze, PhantomData<ArcInner<TcpStream>>: Freeze, PhantomData<u8>: Freeze, [u8; 16]: Freeze, *const () is !null: Freeze, PhantomData<((), ())>: Freeze, *const ArcInner<Chan<Box<[u8]>, Semaphore>> is !null: Freeze, PhantomData<ArcInner<Chan<Box<[u8]>, Semaphore>>>: Freeze, PhantomData<Box<[u8]>>: Freeze,

§

impl Move for RemoveOnDisconnectBundle

§

impl Send for RemoveOnDisconnectBundle
where BoxRaw<Menu>: Send, BoxRaw<FormattedText>: Send, BoxRaw<IndexMap<DataComponentKind, Option<DataComponent>>>: Send, RawTable<(u16, ())>: Send, RawTable<(Uuid, PlayerInfo)>: Send, RawTable<(BlockPos, ServerVerifiedState)>: Send, RawVecInner: Send, RawTable<(Identifier, Vec<u8>)>: Send, RawTable<(MinecraftEntityId, Entity)>: Send, RawTable<(Entity, MinecraftEntityId)>: Send, NonZero<usize>: Send, BoxRaw<str>: Send, &'static str: Send, RawTable<(Identifier, AttributeModifier)>: Send, RawTable<(MobEffect, MobEffectData)>: Send, Arc<RwLock<RawRwLock, PartialWorld>>: Send, Arc<RwLock<RawRwLock, World>>: Send, BoxRaw<[EntityParticle]>: Send, Arc<TcpStream>: Send, Array<u8, UInt<UInt<UInt<UInt<UInt<UTerm, B1>, B0>, B0>, B0>, B0>>: Send, Task<()>: Send, Arc<Chan<Box<[u8]>, Semaphore>>: Send, BoxRaw<[u8]>: Send,

§

impl Sync for RemoveOnDisconnectBundle
where BoxRaw<Menu>: Sync, BoxRaw<FormattedText>: Sync, BoxRaw<IndexMap<DataComponentKind, Option<DataComponent>>>: Sync, RawTable<(u16, ())>: Sync, RawTable<(Uuid, PlayerInfo)>: Sync, RawTable<(BlockPos, ServerVerifiedState)>: Sync, RawVecInner: Sync, RawTable<(Identifier, Vec<u8>)>: Sync, RawTable<(MinecraftEntityId, Entity)>: Sync, RawTable<(Entity, MinecraftEntityId)>: Sync, NonZero<usize>: Sync, BoxRaw<str>: Sync, RawTable<(Identifier, AttributeModifier)>: Sync, RawTable<(MobEffect, MobEffectData)>: Sync, Arc<RwLock<RawRwLock, PartialWorld>>: Sync, Arc<RwLock<RawRwLock, World>>: Sync, BoxRaw<[EntityParticle]>: Sync, Arc<TcpStream>: Sync, Array<u8, UInt<UInt<UInt<UInt<UInt<UTerm, B1>, B0>, B0>, B0>, B0>>: Sync, Task<()>: Sync, Arc<Chan<Box<[u8]>, Semaphore>>: Sync, BoxRaw<[u8]>: Sync,

§

impl Unpin for RemoveOnDisconnectBundle
where Box<Menu>: Unpin, Box<FormattedText>: Unpin, Box<IndexMap<DataComponentKind, Option<DataComponent>>>: Unpin, *const u8 is !null: Unpin, Arc<GameProfileProperties>: Unpin, NonZero<usize>: Unpin, Box<str>: Unpin, &'static str: Unpin, NonZero<u32>: Unpin, Arc<RwLock<RawRwLock, PartialWorld>>: Unpin, Arc<RwLock<RawRwLock, World>>: Unpin, Box<[EntityParticle]>: Unpin, Arc<TcpStream>: Unpin, [u8; 16]: Unpin, Task<()>: Unpin, Arc<Chan<Box<[u8]>, Semaphore>>: Unpin, Box<[u8]>: Unpin,

§

impl UnsafeUnpin for RemoveOnDisconnectBundle
where *const Menu is !null: UnsafeUnpin, PhantomData<Menu>: UnsafeUnpin, *const FormattedText is !null: UnsafeUnpin, PhantomData<FormattedText>: UnsafeUnpin, *const IndexMap<DataComponentKind, Option<DataComponent>> is !null: UnsafeUnpin, PhantomData<IndexMap<DataComponentKind, Option<DataComponent>>>: UnsafeUnpin, *const u8 is !null: UnsafeUnpin, PhantomData<(u16, ())>: UnsafeUnpin, PhantomData<(Uuid, PlayerInfo)>: UnsafeUnpin, PhantomData<(BlockPos, ServerVerifiedState)>: UnsafeUnpin, PhantomData<(BlockPos, BlockState)>: UnsafeUnpin, PhantomData<(Identifier, Vec<u8>)>: UnsafeUnpin, PhantomData<fn() -> NoHashHasher<MinecraftEntityId>>: UnsafeUnpin, PhantomData<(MinecraftEntityId, Entity)>: UnsafeUnpin, PhantomData<(Entity, MinecraftEntityId)>: UnsafeUnpin, NonZeroUsizeInner: UnsafeUnpin, *const str is !null: UnsafeUnpin, PhantomData<str>: UnsafeUnpin, &'static str: UnsafeUnpin, PhantomData<(Identifier, AttributeModifier)>: UnsafeUnpin, PhantomData<(MobEffect, MobEffectData)>: UnsafeUnpin, *const ArcInner<RwLock<RawRwLock, PartialWorld>> is !null: UnsafeUnpin, PhantomData<ArcInner<RwLock<RawRwLock, PartialWorld>>>: UnsafeUnpin, *const ArcInner<RwLock<RawRwLock, World>> is !null: UnsafeUnpin, PhantomData<ArcInner<RwLock<RawRwLock, World>>>: UnsafeUnpin, *const [EntityParticle] is !null: UnsafeUnpin, PhantomData<[EntityParticle]>: UnsafeUnpin, *const ArcInner<TcpStream> is !null: UnsafeUnpin, PhantomData<ArcInner<TcpStream>>: UnsafeUnpin, PhantomData<u8>: UnsafeUnpin, [u8; 16]: UnsafeUnpin, *const () is !null: UnsafeUnpin, PhantomData<((), ())>: UnsafeUnpin, *const ArcInner<Chan<Box<[u8]>, Semaphore>> is !null: UnsafeUnpin, PhantomData<ArcInner<Chan<Box<[u8]>, Semaphore>>>: UnsafeUnpin, PhantomData<Box<[u8]>>: UnsafeUnpin,

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
§

impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
where ST: ?Sized, DT: ?Sized,

§

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
where ST: ?Sized, DT: ?Sized,

§

impl<T> CompatExt for T

§

fn compat(self) -> Compat<T> ⓘ
where T: Sized,

Applies the [Compat] adapter by value. Read more
§

fn compat_ref(&self) -> Compat<&T> ⓘ

Applies the [Compat] adapter by shared reference. Read more
§

fn compat_mut(&mut self) -> Compat<&mut T> ⓘ

Applies the [Compat] adapter by mutable reference. Read more
§

impl<T> ConditionalSend for T
where T: Send,

§

impl<T> Downcast for T
where T: Any,

§

fn into_any(self: Box<T>) -> Box<dyn Any>

Converts Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>, which can then be downcast into Box<dyn ConcreteType> where ConcreteType implements Trait.
§

fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>

Converts Rc<Trait> (where Trait: Downcast) to Rc<Any>, which can then be further downcast into Rc<ConcreteType> where ConcreteType implements Trait.
§

fn as_any(&self) -> &(dyn Any + 'static)

Converts &Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot generate &Any’s vtable from &Trait’s.
§

fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)

Converts &mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot generate &mut Any’s vtable from &mut Trait’s.
§

impl<T> DowncastSend for T
where T: Any + Send,

§

fn into_any_send(self: Box<T>) -> Box<dyn Any + Send>

Converts Box<Trait> (where Trait: DowncastSend) to Box<dyn Any + Send>, which can then be downcast into Box<ConcreteType> where ConcreteType implements Trait.
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self> ⓘ

Instruments this type with the provided [Span], returning an Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self> ⓘ

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<A, B> Interchangeable<A> for B
where A: From<B>, B: From<A>,

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

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 more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
where F: FnOnce(&Self) -> bool,

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 more
§

impl<T> IntoResult<T> for T

§

fn into_result(self) -> Result<T, RunSystemError>

Converts this type into the system output type.
§

impl<A> Is for A
where A: Any,

§

fn is<T>() -> bool
where T: Any,

Checks if the current type “is” another type, using a TypeId equality comparison. This is most useful in the context of generic logic. Read more
§

impl<T> Pointable for T

§

const ALIGN: usize

The alignment of pointer.
§

type Init = T

The type for initializers.
§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
§

impl<T> PolicyExt for T
where T: ?Sized,

§

fn and<P, B, E>(self, other: P) -> And<T, P>
where T: Sized + Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns [Action::Follow] only if self and other return Action::Follow. Read more
§

fn or<P, B, E>(self, other: P) -> Or<T, P>
where T: Sized + Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns [Action::Follow] if either self or other returns Action::Follow. Read more
§

impl<T> Read<Exclusive, BecauseExclusive> for T
where T: ?Sized,

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> ⓘ
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a [WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self> ⓘ

Attaches the current default Subscriber to this type, returning a [WithDispatch] wrapper. Read more