Skip to main content

WSLSessionInformation

Struct WSLSessionInformation 

Source
pub struct WSLSessionInformation(/* private fields */);
Expand description

Represents session information for a WSL instance.

This struct wraps the WSLSessionInformation provided by the WSL Plugin API and provides safe, idiomatic access to its fields.

Implementations§

Source§

impl WSLSessionInformation

Source

pub const fn id(&self) -> SessionID

Retrieves the session ID.

§Returns

The unique session ID as a SessionID.

Source

pub const unsafe fn user_token(&self) -> HANDLE

Retrieves the user token for the session.

§Returns

A HANDLE representing the user token.

§Safety

This function returns a raw handle to the user token. The handle should be used only during the life of the session and must not be closed

Source

pub const unsafe fn user_sid(&self) -> PSID

Retrieves the user SID (security identifier) for the session.

§Returns

A [PSID] representing the user SID.

§Safety

This function returns a raw pointer to the user SID. This pointer should be used only during the life of the session and must not be freed or modified.

Trait Implementations§

Source§

impl AsRef<WSLSessionInformation> for WSLSessionInformation

Source§

fn as_ref(&self) -> &WSLSessionInformation

Converts this type into a shared reference of the (usually inferred) input type.
Source§

impl AsRef<WSLSessionInformation> for WSLSessionInformation

Source§

fn as_ref(&self) -> &WSLSessionInformation

Converts this type into a shared reference of the (usually inferred) input type.
Source§

impl Debug for WSLSessionInformation

Source§

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

Formats the session information for debugging.

The output includes the session ID, user token, and user SID.

Source§

impl From<WSLSessionInformation> for WSLSessionInformation

Source§

fn from(value: WSLSessionInformation) -> Self

Converts to this type from the input type.
Source§

impl From<WSLSessionInformation> for WSLSessionInformation

Source§

fn from(value: WSLSessionInformation) -> Self

Converts to this type from the input type.
Source§

impl Hash for WSLSessionInformation

Source§

fn hash<H: Hasher>(&self, state: &mut H)

Computes a hash based on the session ID.

§Arguments
  • state: The hasher state to update with the session ID.
1.3.0 · Source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where H: Hasher, Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
Source§

impl PartialEq for WSLSessionInformation

Source§

fn eq(&self, other: &Self) -> bool

Compares two WSLSessionInformation instances for equality based on their session IDs.

§Arguments
  • other: The other WSLSessionInformation instance to compare.
§Returns

true if the session IDs are equal, false otherwise.

1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.

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> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
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, 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.
Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more