pub struct ParseSessionHandle<'a> { /* private fields */ }
Expand description
Provides methods for interacting with Parse Server sessions.
Implementations§
Source§impl<'a> ParseSessionHandle<'a>
impl<'a> ParseSessionHandle<'a>
pub fn new(client: &'a Parse) -> Self
Sourcepub async fn me(&self) -> Result<ParseSession, ParseError>
pub async fn me(&self) -> Result<ParseSession, ParseError>
Retrieves the current user’s session details. Requires an active session token to be configured in the client. Corresponds to GET /parse/sessions/me
Sourcepub async fn get_by_object_id(
&self,
object_id: &str,
) -> Result<ParseSession, ParseError>
pub async fn get_by_object_id( &self, object_id: &str, ) -> Result<ParseSession, ParseError>
Retrieves a specific session by its objectId. This operation requires the Master Key.
Sourcepub async fn delete_by_object_id(
&self,
object_id: &str,
) -> Result<(), ParseError>
pub async fn delete_by_object_id( &self, object_id: &str, ) -> Result<(), ParseError>
Deletes a specific session by its objectId. This operation requires the Master Key.
Sourcepub async fn update_by_object_id<T: Serialize + Send + Sync>(
&self,
object_id: &str,
session_data: &T,
) -> Result<SessionUpdateResponse, ParseError>
pub async fn update_by_object_id<T: Serialize + Send + Sync>( &self, object_id: &str, session_data: &T, ) -> Result<SessionUpdateResponse, ParseError>
Updates a specific session by its objectId.
This operation requires the Master Key.
The session_data
should be a serializable struct representing the fields to update.
Sourcepub async fn get_all_sessions(
&self,
query_string: Option<&str>,
) -> Result<Vec<ParseSession>, ParseError>
pub async fn get_all_sessions( &self, query_string: Option<&str>, ) -> Result<Vec<ParseSession>, ParseError>
Retrieves multiple sessions, optionally filtered by a query string.
This operation requires the Master Key.
The query_string
should be the URL-encoded string of parameters (e.g., “limit=10&include=user”).
Auto Trait Implementations§
impl<'a> Freeze for ParseSessionHandle<'a>
impl<'a> !RefUnwindSafe for ParseSessionHandle<'a>
impl<'a> Send for ParseSessionHandle<'a>
impl<'a> Sync for ParseSessionHandle<'a>
impl<'a> Unpin for ParseSessionHandle<'a>
impl<'a> !UnwindSafe for ParseSessionHandle<'a>
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