Struct MumblePtr

pub struct MumblePtr(/* private fields */);
Expand description

A pointer to LinkedMem with utility.

Implementations§

§

impl MumblePtr

pub unsafe fn new(ptr: *mut LinkedMem) -> Option<MumblePtr>

Creates a new access point to the LinkedMem.

§Safety

If the passed pointer is non-null, it must be properly aligned, dereferenceable, and point to an initialized instance of LinkedMem.

pub const fn as_non_null(&self) -> NonNull<LinkedMem>

Returns a NonNull pointer to the LinkedMem.

pub const fn as_ptr(&self) -> *const LinkedMem

Returns a raw pointer to the LinkedMem.

pub const unsafe fn as_ref(&self) -> &LinkedMem

Returns a reference to the LinkedMem.

§Safety

See NonNull::as_ref.

pub fn read(&self) -> LinkedMem

Reads the entire current LinkedMem contents.

pub fn read_ui_version(&self) -> u32

Reads the current ui_version.

pub fn read_ui_tick(&self) -> u32

Reads the current ui_tick.

pub fn read_avatar(&self) -> Position

Reads the current player avatar Position.

pub fn read_name(&self) -> Vec<u16>

Reads the current game name.

pub fn read_name_string(&self) -> OsString

Reads the current game name as OsString.

pub fn read_camera(&self) -> Position

Reads the current camera Position.

pub fn read_identity(&self) -> Vec<u16>

Reads the current player identity.

pub fn read_identity_string(&self) -> OsString

Reads the current player identity as OsString.

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

Parses the current player identity JSON contents.

pub fn read_context(&self) -> Context

Reads the current Context.

pub fn read_server_address(&self) -> [u8; 28]

Reads the current server address.

pub fn read_map_id(&self) -> u32

Reads the current map id.

pub fn read_map_type(&self) -> u32

Reads the current map type.

pub fn read_shard_id(&self) -> u32

Reads the current shard id.

pub fn read_instance(&self) -> u32

Reads the current instance id.

pub fn read_build_id(&self) -> u32

Reads the current build id.

pub fn read_ui_state(&self) -> UiState

Reads the current UI state.

pub fn read_compass_width(&self) -> u16

Reads the current compass width in pixels.

pub fn read_compass_height(&self) -> u16

Reads the current compass height in pixels.

pub fn read_compass_dimensions(&self) -> [u16; 2]

Reads the current compass dimensions in pixels.

pub fn read_compass_rotation(&self) -> f32

Reads the current compass rotation in radians.

pub fn read_player_x(&self) -> f32

Reads the current player position x in continent coordinates.

Not updated in competitive modes.

pub fn read_player_y(&self) -> f32

Reads the current player position y in continent coordinates.

Not updated in competitive modes.

pub fn read_player_position(&self) -> [f32; 2]

Reads the current player position x in continent coordinates.

Not updated in competitive modes.

pub fn read_map_center_x(&self) -> f32

Reads the current map center x in continent coordinates.

Not updated in competitive modes.

pub fn read_map_center_y(&self) -> f32

Reads the current map center y in continent coordinates.

Not updated in competitive modes.

pub fn read_map_center(&self) -> [f32; 2]

Reads the current map center in continent coordinates.

Not updated in competitive modes.

pub fn read_map_scale(&self) -> f32

Reads the map scale.

pub fn read_process_id(&self) -> u32

Reads the process id.

pub fn read_mount_index(&self) -> Mount

Reads the currently used mount.

pub fn read_description(&self) -> Vec<u16>

Reads the game description.

pub fn read_description_string(&self) -> OsString

Reads the game description as OsString.

Trait Implementations§

§

impl Clone for MumblePtr

§

fn clone(&self) -> MumblePtr

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 MumblePtr

§

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

Formats the value using the given formatter. Read more
§

impl Copy for MumblePtr

§

impl Send for MumblePtr

§

impl Sync for MumblePtr

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.