pub struct KPattern { /* private fields */ }Implementations§
source§impl KPattern
impl KPattern
pub fn try_from_data<T>( kpuzzle: T, kpattern_data: &HashMap<KPuzzleOrbitName, KPatternOrbitData> ) -> Result<KPattern, ConversionError>
pub fn to_data(&self) -> HashMap<KPuzzleOrbitName, KPatternOrbitData>
pub fn kpuzzle(&self) -> &KPuzzle
sourcepub unsafe fn packed_orbit_data(&self) -> &PackedOrbitData
pub unsafe fn packed_orbit_data(&self) -> &PackedOrbitData
Safety
packed_orbit_data implementation details are not a public API and implemented using unsafe themselves.
pub fn try_from_json<T>( kpuzzle: T, json_bytes: &[u8] ) -> Result<KPattern, ConversionError>
pub fn get_piece(&self, orbit: &KPuzzleOrbitInfo, i: u8) -> u8
pub fn get_orientation_with_mod<'a>( &self, orbit: &'a KPuzzleOrbitInfo, i: u8 ) -> &'a OrientationWithMod
sourcepub unsafe fn get_orientation_with_mod_unchecked<'a>(
&self,
orbit: &'a KPuzzleOrbitInfo,
i: u8
) -> &'a OrientationWithMod
pub unsafe fn get_orientation_with_mod_unchecked<'a>( &self, orbit: &'a KPuzzleOrbitInfo, i: u8 ) -> &'a OrientationWithMod
Safety
This version does not check whether i is in the correct range.
pub fn set_piece(&mut self, orbit: &KPuzzleOrbitInfo, i: u8, value: u8)
sourcepub unsafe fn set_piece_unchecked(
&mut self,
orbit: &KPuzzleOrbitInfo,
i: u8,
value: u8
)
pub unsafe fn set_piece_unchecked( &mut self, orbit: &KPuzzleOrbitInfo, i: u8, value: u8 )
Safety
This version does not check whether i is in the correct range.
pub fn set_orientation_with_mod( &mut self, orbit: &KPuzzleOrbitInfo, i: u8, orientation_with_mod: &OrientationWithMod )
sourcepub unsafe fn set_orientation_with_mod_unchecked(
&mut self,
orbit: &KPuzzleOrbitInfo,
i: u8,
orientation_with_mod: &OrientationWithMod
)
pub unsafe fn set_orientation_with_mod_unchecked( &mut self, orbit: &KPuzzleOrbitInfo, i: u8, orientation_with_mod: &OrientationWithMod )
Safety
This version does not check whether i or orientation_with_mod are in the correct ranges.
pub fn apply_transformation(&self, transformation: &KTransformation) -> KPattern
pub fn apply_transformation_into( &self, transformation: &KTransformation, into_kpattern: &mut KPattern )
pub fn apply_alg(&self, alg: &Alg) -> Result<KPattern, InvalidAlgError>
pub fn apply_move(&self, m: &Move) -> Result<KPattern, InvalidAlgError>
sourcepub unsafe fn byte_slice(&self) -> &[u8] ⓘ
pub unsafe fn byte_slice(&self) -> &[u8] ⓘ
Safety
The internal structure of bytes is not yet stable.
Trait Implementations§
source§impl From<KPattern> for KPatternBuffer
impl From<KPattern> for KPatternBuffer
source§fn from(initial: KPattern) -> KPatternBuffer
fn from(initial: KPattern) -> KPatternBuffer
Converts to this type from the input type.
source§impl PartialEq for KPattern
impl PartialEq for KPattern
impl Eq for KPattern
impl StructuralEq for KPattern
impl StructuralPartialEq for KPattern
Auto Trait Implementations§
impl RefUnwindSafe for KPattern
impl Send for KPattern
impl Sync for KPattern
impl Unpin for KPattern
impl UnwindSafe for KPattern
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