Struct ContentInfo
pub struct ContentInfo {
pub content_id: u32,
pub guid: GUID,
pub content_type: ContentType,
}
Expand description
Content information.
The contained GUID is interpreted as a Windows GUID
.
See https://learn.microsoft.com/en-us/windows/win32/api/guiddef/ns-guiddef-guid for more information.
Some GW2 community projects misinterpret the memory layout of the GUID as bytes rather than a Windows GUID
.
When comparing or interfacing with such projects, you can use GuidExt::misinterpret
on the GUID
.
Fields§
§content_id: u32
Id of the content (volatile, depends on game build).
guid: GUID
Persistent content GUID.
content_type: ContentType
Content type.
Implementations§
§impl ContentInfo
impl ContentInfo
pub fn guid_string(&self) -> String
pub fn guid_string(&self) -> String
Formats the contained GUID as String
.
pub fn is_species(&self) -> bool
pub fn is_species(&self) -> bool
Whether the content is a species.
Trait Implementations§
§impl Clone for ContentInfo
impl Clone for ContentInfo
§fn clone(&self) -> ContentInfo
fn clone(&self) -> ContentInfo
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 more§impl Debug for ContentInfo
impl Debug for ContentInfo
§impl<'de> Deserialize<'de> for ContentInfo
impl<'de> Deserialize<'de> for ContentInfo
§fn deserialize<__D>(
__deserializer: __D,
) -> Result<ContentInfo, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<ContentInfo, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
§impl Extract for ContentInfo
impl Extract for ContentInfo
§impl Serialize for ContentInfo
impl Serialize for ContentInfo
§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
§impl TryExtract for ContentInfo
impl TryExtract for ContentInfo
§fn can_extract(event: &Event) -> bool
fn can_extract(event: &Event) -> bool
Checks whether
Self
can be extracted from the event.§fn try_extract(event: &Event) -> Option<Self>
fn try_extract(event: &Event) -> Option<Self>
Attempts to extract
Self
from the combat event.Auto Trait Implementations§
impl Freeze for ContentInfo
impl RefUnwindSafe for ContentInfo
impl Send for ContentInfo
impl Sync for ContentInfo
impl Unpin for ContentInfo
impl UnwindSafe for ContentInfo
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