pub enum FieldRef<'a, T: HasView<V>, V> {
Repr(&'a T),
Raw(&'a <T as HasView<V>>::ViewType),
}Expand description
An equivalent to Header for header fields which are accessed by
shared reference.
Variants§
Repr(&'a T)
Reference to the owned representation of a field.
Raw(&'a <T as HasView<V>>::ViewType)
Reference to a field in a borrowed header, which may be owned or borrowed depdendent on past modifications.
Implementations§
Trait Implementations§
Source§impl<Z, T: HasView<V, ViewType = Q> + AsRef<[Z]>, V, Q: AsRef<[Z]>> AsRef<[Z]> for FieldRef<'_, T, V>
impl<Z, T: HasView<V, ViewType = Q> + AsRef<[Z]>, V, Q: AsRef<[Z]>> AsRef<[Z]> for FieldRef<'_, T, V>
Source§impl<'a, T: HasView<V>, V> From<&'a BoxedHeader<T, <T as HasView<V>>::ViewType>> for FieldRef<'a, T, V>
Available on crate feature alloc only.
impl<'a, T: HasView<V>, V> From<&'a BoxedHeader<T, <T as HasView<V>>::ViewType>> for FieldRef<'a, T, V>
Available on crate feature
alloc only.Source§impl<'a, T: HasView<V>, V> From<&'a InlineHeader<T, <T as HasView<V>>::ViewType>> for FieldRef<'a, T, V>
impl<'a, T: HasView<V>, V> From<&'a InlineHeader<T, <T as HasView<V>>::ViewType>> for FieldRef<'a, T, V>
Source§impl<T: HeaderLen + HasView<V>, V> HeaderLen for FieldRef<'_, T, V>
impl<T: HeaderLen + HasView<V>, V> HeaderLen for FieldRef<'_, T, V>
Source§const MINIMUM_LENGTH: usize = T::MINIMUM_LENGTH
const MINIMUM_LENGTH: usize = T::MINIMUM_LENGTH
The minimum number of bytes a packet of this kind occupies
when serialised.
Source§fn packet_length(&self) -> usize
fn packet_length(&self) -> usize
The number of bytes which this packet would occupy when serialised. Read more
Source§impl<T: HasView<V, ViewType = Q> + NextLayer, V, Q> NextLayer for FieldRef<'_, T, V>
impl<T: HasView<V, ViewType = Q> + NextLayer, V, Q> NextLayer for FieldRef<'_, T, V>
Auto Trait Implementations§
impl<'a, T, V> Freeze for FieldRef<'a, T, V>
impl<'a, T, V> RefUnwindSafe for FieldRef<'a, T, V>
impl<'a, T, V> Send for FieldRef<'a, T, V>
impl<'a, T, V> Sync for FieldRef<'a, T, V>
impl<'a, T, V> Unpin for FieldRef<'a, T, V>
impl<'a, T, V> UnwindSafe for FieldRef<'a, T, V>
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