pub struct GnuExtension {
pub position: u64,
pub payload: Vec<u8>,
}Expand description
A GNU long-name or long-link extension value needed to interpret a member.
Fields§
§position: u64The absolute byte position of the GNU extension header block.
payload: Vec<u8>The meaningful extension payload bytes, excluding tar padding.
Implementations§
Source§impl GnuExtension
impl GnuExtension
Sourcepub fn value(
&self,
kind: GnuKind,
policy: &StreamPolicy,
) -> Result<&[u8], FrameError>
pub fn value( &self, kind: GnuKind, policy: &StreamPolicy, ) -> Result<&[u8], FrameError>
Returns the name or link target, excluding its NUL terminator and trailing NULs.
If the policy permits unterminated GNU extensions, a payload with no NUL is returned in full. Non-NUL bytes following a terminator are an error.
Trait Implementations§
Source§impl Clone for GnuExtension
impl Clone for GnuExtension
Auto Trait Implementations§
impl Forget for GnuExtension
impl Freeze for GnuExtension
impl Move for GnuExtension
impl RefUnwindSafe for GnuExtension
impl Send for GnuExtension
impl Sync for GnuExtension
impl Unpin for GnuExtension
impl UnsafeUnpin for GnuExtension
impl UnwindSafe for GnuExtension
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