Struct gif::AnyExtension
source · [−]pub struct AnyExtension(pub u8);
Expand description
A newtype wrapper around an arbitrary extension ID.
An extension is some amount of byte data organized in sub-blocks so that one can skip over it
without knowing the semantics. Though technically you likely want to use a Application
extension, the library tries to stay flexible here.
This allows us to customize the set of impls compared to a raw u8
. It also clarifies the
intent and gives some inherent methods for interoperability with known extension types.
Tuple Fields
0: u8
Implementations
sourceimpl AnyExtension
impl AnyExtension
sourcepub fn into_known(self) -> Option<Extension>
pub fn into_known(self) -> Option<Extension>
Decode the label as a known extension.
Trait Implementations
sourceimpl Clone for AnyExtension
impl Clone for AnyExtension
sourcefn clone(&self) -> AnyExtension
fn clone(&self) -> AnyExtension
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 Debug for AnyExtension
impl Debug for AnyExtension
sourceimpl From<Extension> for AnyExtension
impl From<Extension> for AnyExtension
sourceimpl Hash for AnyExtension
impl Hash for AnyExtension
sourceimpl PartialEq<AnyExtension> for AnyExtension
impl PartialEq<AnyExtension> for AnyExtension
sourcefn eq(&self, other: &AnyExtension) -> bool
fn eq(&self, other: &AnyExtension) -> bool
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
sourcefn ne(&self, other: &AnyExtension) -> bool
fn ne(&self, other: &AnyExtension) -> bool
This method tests for !=
.
impl Copy for AnyExtension
impl Eq for AnyExtension
impl StructuralEq for AnyExtension
impl StructuralPartialEq for AnyExtension
Auto Trait Implementations
impl RefUnwindSafe for AnyExtension
impl Send for AnyExtension
impl Sync for AnyExtension
impl Unpin for AnyExtension
impl UnwindSafe for AnyExtension
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcepub fn borrow_mut(&mut self) -> &mut T
pub fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
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.
sourcepub fn to_owned(&self) -> T
pub fn to_owned(&self) -> T
Creates owned data from borrowed data, usually by cloning. Read more
sourcepub fn clone_into(&self, target: &mut T)
pub fn clone_into(&self, target: &mut T)
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more