pub struct RegistryCache {
pub registry_packets: Arc<[EncodedPacket]>,
pub tags_packet: Arc<EncodedPacket>,
}Expand description
Caches compressed registry packets to avoid re-compressing them for every player.
Fields§
§registry_packets: Arc<[EncodedPacket]>The cached registry data packets.
The cached tags packet.
Implementations§
Source§impl RegistryCache
impl RegistryCache
Sourcepub fn new(compression: Option<CompressionInfo>) -> Self
pub fn new(compression: Option<CompressionInfo>) -> Self
Creates a new RegistryCache from the given registry.
fn build_registry_packets(registry: &Registry) -> Vec<CRegistryData>
Auto Trait Implementations§
impl Freeze for RegistryCache
impl RefUnwindSafe for RegistryCache
impl Send for RegistryCache
impl Sync for RegistryCache
impl Unpin for RegistryCache
impl UnsafeUnpin for RegistryCache
impl UnwindSafe for RegistryCache
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<>>