Enum twmap::CompressedData
source · [−]Variants
Compressed(Vec<u8>, usize, U)
Loaded(T)
Implementations
sourceimpl<T> CompressedData<Array2<T>, TilesLoadInfo>
impl<T> CompressedData<Array2<T>, TilesLoadInfo>
sourceimpl<T, U> CompressedData<T, U>
impl<T, U> CompressedData<T, U>
sourcepub const fn unwrap_ref(&self) -> &T
pub const fn unwrap_ref(&self) -> &T
Returns a reference to the inner loaded value. Panics if isn’t loaded.
sourcepub fn unwrap_mut(&mut self) -> &mut T
pub fn unwrap_mut(&mut self) -> &mut T
Returns a mutable reference to the inner loaded value. Panics if isn’t loaded.
Trait Implementations
sourceimpl CheckData for CompressedData<RgbaImage, ImageLoadInfo>
impl CheckData for CompressedData<RgbaImage, ImageLoadInfo>
type ErrorKind = ImageErrorKind
type CompressedErrorKind = CompressedImageError
fn check_loaded_data(&self) -> Result<(), ImageErrorKind>
fn check_compressed_data(&self) -> Result<(), CompressedImageError>
fn check_data(&self) -> Result<(), Self::ErrorKind>
sourceimpl<T: TileChecking> CheckData for CompressedData<Array2<T>, TilesLoadInfo>
impl<T: TileChecking> CheckData for CompressedData<Array2<T>, TilesLoadInfo>
type ErrorKind = LayerErrorKind
type CompressedErrorKind = CompressedLayerError
fn check_loaded_data(&self) -> Result<(), Self::ErrorKind>
fn check_compressed_data(&self) -> Result<(), Self::CompressedErrorKind>
fn check_data(&self) -> Result<(), Self::ErrorKind>
sourceimpl CheckData for CompressedData<Vec<u8>, ()>
impl CheckData for CompressedData<Vec<u8>, ()>
type ErrorKind = SoundErrorKind
type CompressedErrorKind = CompressedSoundError
fn check_loaded_data(&self) -> Result<(), SoundErrorKind>
fn check_compressed_data(&self) -> Result<(), CompressedSoundError>
fn check_data(&self) -> Result<(), Self::ErrorKind>
sourceimpl<T: Clone, U: Clone> Clone for CompressedData<T, U>
impl<T: Clone, U: Clone> Clone for CompressedData<T, U>
sourcefn clone(&self) -> CompressedData<T, U>
fn clone(&self) -> CompressedData<T, U>
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl<T: Debug, U: Debug> Debug for CompressedData<T, U>
impl<T: Debug, U: Debug> Debug for CompressedData<T, U>
sourceimpl<'de, T, U> Deserialize<'de> for CompressedData<T, U> where
T: Deserialize<'de>,
U: Deserialize<'de>,
impl<'de, T, U> Deserialize<'de> for CompressedData<T, U> where
T: Deserialize<'de>,
U: Deserialize<'de>,
sourcefn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
sourceimpl<T, U> From<T> for CompressedData<T, U>
impl<T, U> From<T> for CompressedData<T, U>
sourceimpl Load for CompressedData<Vec<u8>, ()>
impl Load for CompressedData<Vec<u8>, ()>
fn load_unchecked(&mut self) -> Result<(), Self::CompressedErrorKind>
fn load(&mut self) -> Result<(), Self::ErrorKind>
sourceimpl Load for CompressedData<RgbaImage, ImageLoadInfo>
impl Load for CompressedData<RgbaImage, ImageLoadInfo>
fn load_unchecked(&mut self) -> Result<(), Self::CompressedErrorKind>
fn load(&mut self) -> Result<(), Self::ErrorKind>
sourceimpl<T: AnyTile> Load for CompressedData<Array2<T>, TilesLoadInfo> where
CompressedData<Array2<T>, TilesLoadInfo>: CheckData<CompressedErrorKind = CompressedLayerError, ErrorKind = LayerErrorKind>,
impl<T: AnyTile> Load for CompressedData<Array2<T>, TilesLoadInfo> where
CompressedData<Array2<T>, TilesLoadInfo>: CheckData<CompressedErrorKind = CompressedLayerError, ErrorKind = LayerErrorKind>,
fn load_unchecked(&mut self) -> Result<(), CompressedLayerError>
fn load(&mut self) -> Result<(), Self::ErrorKind>
sourceimpl<T: PartialEq, U: PartialEq> PartialEq<CompressedData<T, U>> for CompressedData<T, U>
impl<T: PartialEq, U: PartialEq> PartialEq<CompressedData<T, U>> for CompressedData<T, U>
sourcefn eq(&self, other: &CompressedData<T, U>) -> bool
fn eq(&self, other: &CompressedData<T, U>) -> bool
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
sourcefn ne(&self, other: &CompressedData<T, U>) -> bool
fn ne(&self, other: &CompressedData<T, U>) -> bool
This method tests for !=
.
sourceimpl<T, U> Serialize for CompressedData<T, U> where
T: Serialize,
U: Serialize,
impl<T, U> Serialize for CompressedData<T, U> where
T: Serialize,
U: Serialize,
impl<T, U> StructuralPartialEq for CompressedData<T, U>
Auto Trait Implementations
impl<T, U> RefUnwindSafe for CompressedData<T, U> where
T: RefUnwindSafe,
U: RefUnwindSafe,
impl<T, U> Send for CompressedData<T, U> where
T: Send,
U: Send,
impl<T, U> Sync for CompressedData<T, U> where
T: Sync,
U: Sync,
impl<T, U> Unpin for CompressedData<T, U> where
T: Unpin,
U: Unpin,
impl<T, U> UnwindSafe for CompressedData<T, U> where
T: UnwindSafe,
U: UnwindSafe,
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
impl<T> Pointable for T
impl<T> Pointable for T
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
🔬 This is a nightly-only experimental API. (
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more