Struct LinkedMem

#[repr(C)]
pub struct LinkedMem { pub ui_version: u32, pub ui_tick: u32, pub avatar: Position, pub name: [u16; 256], pub camera: Position, pub identity: [u16; 256], pub context_len: u32, pub context: Context, pub description: [u16; 2048], }
Expand description

MumbleLink shared memory.

Fields§

§ui_version: u32

UI version.

§ui_tick: u32

UI tick.

§avatar: Position

Position of the player in map coordinate system.

See API:1/event_details#Coordinate_recalculation.

Updated every frame. Should be able to read 50 times a second.

§name: [u16; 256]

Game name.

§camera: Position

Position of the camera.

Updated every frame. Should be able to read 50 times a second.

§identity: [u16; 256]

Identity information as JSON.

Should only change a few times per second.

§context_len: u32

Length of the following context.

Hardcoded to 48 for Guild Wars 2 despite Context being larger.

§context: Context

See Context.

Should only change a few times per second.

§description: [u16; 2048]

Game description.

Implementations§

§

impl LinkedMem

pub fn name_string(&self) -> OsString

Returns the name as OsString.

pub fn identity_string(&self) -> OsString

Returns the name as OsString.

pub fn description_string(&self) -> OsString

Returns the name as OsString.

pub fn parse_identity(&self) -> Result<Identity, Error>

Parses the current identity JSON contents.

Trait Implementations§

§

impl Clone for LinkedMem

§

fn clone(&self) -> LinkedMem

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
§

impl Debug for LinkedMem

§

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

Formats the value using the given formatter. 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> Same for T

Source§

type Output = T

Should always be Self
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.