Trait hexe_core::misc::Extract
[−]
[src]
pub trait Extract<T: ?Sized> { type Output: ?Sized; fn extract<'a>(self, buf: &'a T) -> &'a Self::Output; fn extract_mut<'a>(self, buf: &'a mut T) -> &'a mut Self::Output; }
A type whose instances may be used to extract references from buffers.
All operations are non-panicking and cannot fail.
Associated Types
Required Methods
fn extract<'a>(self, buf: &'a T) -> &'a Self::Output
Extracts a reference to the value for self
within buf
.
fn extract_mut<'a>(self, buf: &'a mut T) -> &'a mut Self::Output
Extracts a mutable reference to the value for self
within buf
.
Implementors
impl<T> Extract<[T; 16]> for Rights type Output = T;
impl<T> Extract<[T; 2]> for Side type Output = T;
impl<'r, T> Extract<[T; 2]> for &'r Range<Side> type Output = [T];
impl<T> Extract<[T; 4]> for Right type Output = T;
impl<'r, T> Extract<[T; 4]> for &'r Range<Right> type Output = [T];
impl<T> Extract<[T; 2]> for Color type Output = T;
impl<'r, T> Extract<[T; 2]> for &'r Range<Color> type Output = [T];
impl<T> Extract<[T; 12]> for Piece type Output = T;
impl<'r, T> Extract<[T; 12]> for &'r Range<Piece> type Output = [T];
impl<T> Extract<[T; 6]> for Role type Output = T;
impl<'r, T> Extract<[T; 6]> for &'r Range<Role> type Output = [T];
impl<T> Extract<[T; 4]> for Promotion type Output = T;
impl<'r, T> Extract<[T; 4]> for &'r Range<Promotion> type Output = [T];
impl<T> Extract<[T; 8]> for File type Output = T;
impl<'r, T> Extract<[T; 8]> for &'r Range<File> type Output = [T];
impl<T> Extract<[T; 8]> for Rank type Output = T;
impl<'r, T> Extract<[T; 8]> for &'r Range<Rank> type Output = [T];
impl<T> Extract<[T; 64]> for Square type Output = T;
impl<'r, T> Extract<[T; 64]> for &'r Range<Square> type Output = [T];