Skip to main content

ShellLinkHeader

Struct ShellLinkHeader 

Source
pub struct ShellLinkHeader { /* private fields */ }
Expand description

A ShellLinkHeader structure (section 2.1), which contains identification information, timestamps, and flags that specify the presence of optional structures.

Implementations§

Source§

impl ShellLinkHeader

Source

pub fn header_size(&self) -> &u32

The size, in bytes, of this structure. This value MUST be 0x0000004C.

This value MUST be 00021401-0000-0000-C000-000000000046.

A LinkFlags structure (section 2.1.1) that specifies information about the shell link and the presence of optional portions of the structure.

Source

pub fn file_attributes(&self) -> &FileAttributeFlags

A FileAttributesFlags structure (section 2.1.2) that specifies information about the link target.

Source

pub fn creation_time(&self) -> &FileTime

A FILETIME structure ([MS-DTYP]section 2.3.3) that specifies the creation time of the link target in UTC (Coordinated Universal Time). If the value is zero, there is no creation time set on the link target.

Source

pub fn access_time(&self) -> &FileTime

A FILETIME structure ([MS-DTYP] section2.3.3) that specifies the access time of the link target in UTC (Coordinated Universal Time). If the value is zero, there is no access time set on the link target.

Source

pub fn write_time(&self) -> &FileTime

A FILETIME structure ([MS-DTYP] section 2.3.3) that specifies the write time of the link target in UTC (Coordinated Universal Time). If the value is zero, there is no write time set on the link target.

Source

pub fn file_size(&self) -> &u32

A 32-bit unsigned integer that specifies the size, in bytes, of the link target. If the link target fileis larger than 0xFFFFFFFF, this value specifies the least significant 32 bits of the link target file size.

Source

pub fn icon_index(&self) -> &i32

A 32-bit signed integer that specifies the index of an icon within a given icon location.

Source

pub fn show_command(&self) -> &ShowCommand

A 32-bit unsigned integer that specifies the expected window state of an application launched by the link.

Source

pub fn hotkey(&self) -> &HotkeyFlags

A HotkeyFlags structure (section 2.1.3) that specifies the keystrokes used to launch the application referenced by the shortcut key. This value is assigned to the application after it is launched, so that pressing the key activates that application.

Source

pub fn reserved1(&self) -> &u16

A value that MUST be zero

Source

pub fn reserved2(&self) -> &u32

A value that MUST be zero

Source

pub fn reserved3(&self) -> &u32

A value that MUST be zero

Source§

impl ShellLinkHeader

Source

pub fn header_size_mut(&mut self) -> &mut u32

The size, in bytes, of this structure. This value MUST be 0x0000004C.

This value MUST be 00021401-0000-0000-C000-000000000046.

A LinkFlags structure (section 2.1.1) that specifies information about the shell link and the presence of optional portions of the structure.

Source

pub fn file_attributes_mut(&mut self) -> &mut FileAttributeFlags

A FileAttributesFlags structure (section 2.1.2) that specifies information about the link target.

Source

pub fn creation_time_mut(&mut self) -> &mut FileTime

A FILETIME structure ([MS-DTYP]section 2.3.3) that specifies the creation time of the link target in UTC (Coordinated Universal Time). If the value is zero, there is no creation time set on the link target.

Source

pub fn access_time_mut(&mut self) -> &mut FileTime

A FILETIME structure ([MS-DTYP] section2.3.3) that specifies the access time of the link target in UTC (Coordinated Universal Time). If the value is zero, there is no access time set on the link target.

Source

pub fn write_time_mut(&mut self) -> &mut FileTime

A FILETIME structure ([MS-DTYP] section 2.3.3) that specifies the write time of the link target in UTC (Coordinated Universal Time). If the value is zero, there is no write time set on the link target.

Source

pub fn file_size_mut(&mut self) -> &mut u32

A 32-bit unsigned integer that specifies the size, in bytes, of the link target. If the link target fileis larger than 0xFFFFFFFF, this value specifies the least significant 32 bits of the link target file size.

Source

pub fn icon_index_mut(&mut self) -> &mut i32

A 32-bit signed integer that specifies the index of an icon within a given icon location.

Source

pub fn show_command_mut(&mut self) -> &mut ShowCommand

A 32-bit unsigned integer that specifies the expected window state of an application launched by the link.

Source

pub fn hotkey_mut(&mut self) -> &mut HotkeyFlags

A HotkeyFlags structure (section 2.1.3) that specifies the keystrokes used to launch the application referenced by the shortcut key. This value is assigned to the application after it is launched, so that pressing the key activates that application.

Source

pub fn reserved1_mut(&mut self) -> &mut u16

A value that MUST be zero

Source

pub fn reserved2_mut(&mut self) -> &mut u32

A value that MUST be zero

Source

pub fn reserved3_mut(&mut self) -> &mut u32

A value that MUST be zero

Source§

impl ShellLinkHeader

Source

pub fn set_header_size(&mut self, val: u32) -> &mut Self

The size, in bytes, of this structure. This value MUST be 0x0000004C.

This value MUST be 00021401-0000-0000-C000-000000000046.

A LinkFlags structure (section 2.1.1) that specifies information about the shell link and the presence of optional portions of the structure.

Source

pub fn set_file_attributes(&mut self, val: FileAttributeFlags) -> &mut Self

A FileAttributesFlags structure (section 2.1.2) that specifies information about the link target.

Source

pub fn set_creation_time(&mut self, val: FileTime) -> &mut Self

A FILETIME structure ([MS-DTYP]section 2.3.3) that specifies the creation time of the link target in UTC (Coordinated Universal Time). If the value is zero, there is no creation time set on the link target.

Source

pub fn set_access_time(&mut self, val: FileTime) -> &mut Self

A FILETIME structure ([MS-DTYP] section2.3.3) that specifies the access time of the link target in UTC (Coordinated Universal Time). If the value is zero, there is no access time set on the link target.

Source

pub fn set_write_time(&mut self, val: FileTime) -> &mut Self

A FILETIME structure ([MS-DTYP] section 2.3.3) that specifies the write time of the link target in UTC (Coordinated Universal Time). If the value is zero, there is no write time set on the link target.

Source

pub fn set_file_size(&mut self, val: u32) -> &mut Self

A 32-bit unsigned integer that specifies the size, in bytes, of the link target. If the link target fileis larger than 0xFFFFFFFF, this value specifies the least significant 32 bits of the link target file size.

Source

pub fn set_icon_index(&mut self, val: i32) -> &mut Self

A 32-bit signed integer that specifies the index of an icon within a given icon location.

Source

pub fn set_show_command(&mut self, val: ShowCommand) -> &mut Self

A 32-bit unsigned integer that specifies the expected window state of an application launched by the link.

Source

pub fn set_hotkey(&mut self, val: HotkeyFlags) -> &mut Self

A HotkeyFlags structure (section 2.1.3) that specifies the keystrokes used to launch the application referenced by the shortcut key. This value is assigned to the application after it is launched, so that pressing the key activates that application.

Source

pub fn set_reserved1(&mut self, val: u16) -> &mut Self

A value that MUST be zero

Source

pub fn set_reserved2(&mut self, val: u32) -> &mut Self

A value that MUST be zero

Source

pub fn set_reserved3(&mut self, val: u32) -> &mut Self

A value that MUST be zero

Source§

impl ShellLinkHeader

Set some link flags

Trait Implementations§

Source§

impl BinRead for ShellLinkHeader

Source§

type Args<'__binrw_generated_args_lifetime> = ()

The type used for the args parameter of read_args() and read_options(). Read more
Source§

fn read_options<R: Read + Seek>( __binrw_generated_var_reader: &mut R, __binrw_generated_var_endian: Endian, __binrw_generated_var_arguments: Self::Args<'_>, ) -> BinResult<Self>

Read Self from the reader using the given Endian and arguments. Read more
Source§

fn read_be<R>(reader: &mut R) -> Result<Self, Error>
where R: Read + Seek, Self::Args<'a>: for<'a> Required,

Read Self from the reader using default arguments and assuming big-endian byte order. Read more
Source§

fn read_le<R>(reader: &mut R) -> Result<Self, Error>
where R: Read + Seek, Self::Args<'a>: for<'a> Required,

Read Self from the reader using default arguments and assuming little-endian byte order. Read more
Source§

fn read_ne<R>(reader: &mut R) -> Result<Self, Error>
where R: Read + Seek, Self::Args<'a>: for<'a> Required,

Read T from the reader assuming native-endian byte order. Read more
Source§

fn read_be_args<R>(reader: &mut R, args: Self::Args<'_>) -> Result<Self, Error>
where R: Read + Seek,

Read Self from the reader, assuming big-endian byte order, using the given arguments. Read more
Source§

fn read_le_args<R>(reader: &mut R, args: Self::Args<'_>) -> Result<Self, Error>
where R: Read + Seek,

Read Self from the reader, assuming little-endian byte order, using the given arguments. Read more
Source§

fn read_ne_args<R>(reader: &mut R, args: Self::Args<'_>) -> Result<Self, Error>
where R: Read + Seek,

Read T from the reader, assuming native-endian byte order, using the given arguments. Read more
Source§

impl Clone for ShellLinkHeader

Source§

fn clone(&self) -> ShellLinkHeader

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for ShellLinkHeader

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for ShellLinkHeader

Source§

fn default() -> Self

Create a new, blank, ShellLinkHeader

Source§

impl Serialize for ShellLinkHeader

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.