[−][src]Enum greetd_ipc::Request
A request from a greeter to greetd. The request type is internally tagged with the"type" field, with the type written in snake_case.
Example serialization:
{
"type": "create_session",
"username": "bob"
}
Variants
CreateSession initiates a login attempt for the given user. CreateSession returns either a Response::AuthMessage, Response::Success or Response::Failure.
If an auth message is returned, it should be answered with a Request::PostAuthMessageResponse. If a success is returned, the session can then be started with Request::StartSession.
If a login flow needs to be aborted at any point, send Request::CancelSession. Note that the session is cancelled automatically on error.
Fields of CreateSession
username: String
PostAuthMessageResponse responds to the last auth message, and returns either a Response::AuthMessage, Response::Success or Response::Failure.
If an auth message is returned, it should be answered with a Request::PostAuthMessageResponse. If a success is returned, the session can then be started with Request::StartSession.
Start a successfully logged in session. This will fail if the session has pending messages or has encountered an error.
Cancel a session. This can only be done if the session has not been started. Cancel does not have to be called if an error has been encountered in its setup or login flow.
Trait Implementations
impl Debug for Request
[src]
impl<'de> Deserialize<'de> for Request
[src]
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
[src]
__D: Deserializer<'de>,
impl Serialize for Request
[src]
fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error> where
__S: Serializer,
[src]
__S: Serializer,
impl SyncCodec for Request
[src]
fn read_from<T: Read>(stream: &mut T) -> Result<Self, Error>
[src]
fn write_to<T: Write>(&self, stream: &mut T) -> Result<(), Error>
[src]
impl TokioCodec for Request
[src]
fn read_from<'life0, 'async_trait, T: AsyncReadExt + Unpin + Send>(
stream: &'life0 mut T
) -> Pin<Box<dyn Future<Output = Result<Self, Error>> + Send + 'async_trait>> where
T: 'async_trait,
'life0: 'async_trait,
Self: 'async_trait,
[src]
stream: &'life0 mut T
) -> Pin<Box<dyn Future<Output = Result<Self, Error>> + Send + 'async_trait>> where
T: 'async_trait,
'life0: 'async_trait,
Self: 'async_trait,
fn write_to<'life0, 'life1, 'async_trait, T: AsyncWriteExt + Unpin + Send>(
&'life0 self,
stream: &'life1 mut T
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>> where
T: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
[src]
&'life0 self,
stream: &'life1 mut T
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>> where
T: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
Auto Trait Implementations
impl RefUnwindSafe for Request
impl Send for Request
impl Sync for Request
impl Unpin for Request
impl UnwindSafe for Request
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> DeserializeOwned for T where
T: for<'de> Deserialize<'de>,
[src]
T: for<'de> Deserialize<'de>,
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,