pub struct RuntimeResourceID { /* private fields */ }
Expand description
Represents a runtime resource identifier.
Implementations§
Source§impl RuntimeResourceID
impl RuntimeResourceID
pub fn to_hex_string(&self) -> String
pub fn is_valid(&self) -> bool
pub fn invalid() -> Self
Sourcepub fn from_resource_id(rid: &ResourceID) -> Self
pub fn from_resource_id(rid: &ResourceID) -> Self
Create RuntimeResourceID from ResourceID
Sourcepub fn from_raw_string(string: &str) -> Self
pub fn from_raw_string(string: &str) -> Self
prefer [from_resource_id] when possible
Sourcepub fn from_hex_string(hex_string: &str) -> Result<Self, RuntimeResourceIDError>
pub fn from_hex_string(hex_string: &str) -> Result<Self, RuntimeResourceIDError>
Create RuntimeResourceID from hexadecimal string Also accepts 0x prefixed strings
Trait Implementations§
Source§impl BinRead for RuntimeResourceID
impl BinRead for RuntimeResourceID
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>
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>
Source§fn read<R>(reader: &mut R) -> Result<Self, Error>
fn read<R>(reader: &mut R) -> Result<Self, Error>
Read
Self
from the reader using default arguments. Read moreSource§fn read_be<R>(reader: &mut R) -> Result<Self, Error>
fn read_be<R>(reader: &mut R) -> Result<Self, Error>
Read
Self
from the reader using default arguments and assuming
big-endian byte order. Read moreSource§fn read_le<R>(reader: &mut R) -> Result<Self, Error>
fn read_le<R>(reader: &mut R) -> Result<Self, Error>
Read
Self
from the reader using default arguments and assuming
little-endian byte order. Read moreSource§fn read_ne<R>(reader: &mut R) -> Result<Self, Error>
fn read_ne<R>(reader: &mut R) -> Result<Self, Error>
Read
T
from the reader assuming native-endian byte order. Read moreSource§fn read_args<R>(reader: &mut R, args: Self::Args<'_>) -> Result<Self, Error>
fn read_args<R>(reader: &mut R, args: Self::Args<'_>) -> Result<Self, Error>
Read
Self
from the reader using the given arguments. Read moreSource§fn read_be_args<R>(reader: &mut R, args: Self::Args<'_>) -> Result<Self, Error>
fn read_be_args<R>(reader: &mut R, args: Self::Args<'_>) -> Result<Self, Error>
Read
Self
from the reader, assuming big-endian byte order, using the
given arguments. Read moreSource§impl BinWrite for RuntimeResourceID
impl BinWrite for RuntimeResourceID
Source§fn write_options<W: Write + Seek>(
&self,
__binrw_generated_var_writer: &mut W,
__binrw_generated_var_endian: Endian,
__binrw_generated_var_arguments: Self::Args<'_>,
) -> BinResult<()>
fn write_options<W: Write + Seek>( &self, __binrw_generated_var_writer: &mut W, __binrw_generated_var_endian: Endian, __binrw_generated_var_arguments: Self::Args<'_>, ) -> BinResult<()>
Source§fn write<W>(&self, writer: &mut W) -> Result<(), Error>
fn write<W>(&self, writer: &mut W) -> Result<(), Error>
Write
Self
to the writer using default arguments. Read moreSource§fn write_be<W>(&self, writer: &mut W) -> Result<(), Error>
fn write_be<W>(&self, writer: &mut W) -> Result<(), Error>
Write
Self
to the writer assuming big-endian byte order. Read moreSource§fn write_le<W>(&self, writer: &mut W) -> Result<(), Error>
fn write_le<W>(&self, writer: &mut W) -> Result<(), Error>
Write
Self
to the writer assuming little-endian byte order. Read moreSource§fn write_args<W>(
&self,
writer: &mut W,
args: Self::Args<'_>,
) -> Result<(), Error>
fn write_args<W>( &self, writer: &mut W, args: Self::Args<'_>, ) -> Result<(), Error>
Write
Self
to the writer using the given arguments. Read moreSource§impl Clone for RuntimeResourceID
impl Clone for RuntimeResourceID
Source§fn clone(&self) -> RuntimeResourceID
fn clone(&self) -> RuntimeResourceID
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for RuntimeResourceID
impl Debug for RuntimeResourceID
Source§impl Default for RuntimeResourceID
impl Default for RuntimeResourceID
Source§fn default() -> RuntimeResourceID
fn default() -> RuntimeResourceID
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for RuntimeResourceID
impl<'de> Deserialize<'de> for RuntimeResourceID
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Display for RuntimeResourceID
impl Display for RuntimeResourceID
Source§impl From<&str> for RuntimeResourceID
impl From<&str> for RuntimeResourceID
Source§impl From<ResourceID> for RuntimeResourceID
impl From<ResourceID> for RuntimeResourceID
Source§fn from(value: ResourceID) -> Self
fn from(value: ResourceID) -> Self
Converts to this type from the input type.
Source§impl From<RuntimeResourceID> for u64
impl From<RuntimeResourceID> for u64
Source§fn from(value: RuntimeResourceID) -> Self
fn from(value: RuntimeResourceID) -> Self
Converts to this type from the input type.
Source§impl From<u64> for RuntimeResourceID
impl From<u64> for RuntimeResourceID
Source§impl Hash for RuntimeResourceID
impl Hash for RuntimeResourceID
Source§impl PartialEq<u64> for RuntimeResourceID
impl PartialEq<u64> for RuntimeResourceID
Source§impl PartialEq for RuntimeResourceID
impl PartialEq for RuntimeResourceID
Source§impl ReadEndian for RuntimeResourceID
impl ReadEndian for RuntimeResourceID
Source§const ENDIAN: EndianKind
const ENDIAN: EndianKind
The endianness of the type.
Source§impl Serialize for RuntimeResourceID
impl Serialize for RuntimeResourceID
Source§impl WriteEndian for RuntimeResourceID
impl WriteEndian for RuntimeResourceID
Source§const ENDIAN: EndianKind
const ENDIAN: EndianKind
The endianness of the type.
impl Copy for RuntimeResourceID
impl Eq for RuntimeResourceID
impl StructuralPartialEq for RuntimeResourceID
Auto Trait Implementations§
impl Freeze for RuntimeResourceID
impl RefUnwindSafe for RuntimeResourceID
impl Send for RuntimeResourceID
impl Sync for RuntimeResourceID
impl Unpin for RuntimeResourceID
impl UnwindSafe for RuntimeResourceID
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> CustomError for T
impl<T> CustomError for T
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more