Enum sbd::mo::SessionStatus

source ·
pub enum SessionStatus {
    Ok,
    OkMobileTerminatedTooLarge,
    OkLocationUnacceptableQuality,
    Timeout,
    MobileOriginatedTooLarge,
    RFLinkLoss,
    IMEIProtocolAnomaly,
    Prohibited,
}
Expand description

The status of a mobile-originated session.

The descriptions for these codes are taken directly from the DirectIP documentation.

Variants§

§

Ok

The SBD session completed successfully.

§

OkMobileTerminatedTooLarge

The MO message transfer, if any, was successful. The MT message queued at the GSS is too large to be transferred within a single SBD session.

§

OkLocationUnacceptableQuality

The MO message transfer, if any, was successful. The reported location was determined to be of unacceptable quality. This value is only applicable to IMEIs using SBD protocol revision 1.

§

Timeout

The SBD session timed out before session completion.

§

MobileOriginatedTooLarge

The MO message being transferred by the IMEI is too large to be transerred within a single SBD session.

§

RFLinkLoss

An RF link loss ocurred during the SBD session.

§

IMEIProtocolAnomaly

An IMEI protocol anomaly occurred during SBD session.

§

Prohibited

The IMEI is prohibited from accessing the GSS.

Implementations§

source§

impl SessionStatus

source

pub fn new(n: u8) -> Result<SessionStatus, Error>

Creates a new session status from a code.

Returns an error if the code is unknown.

Examples
use sbd::mo::SessionStatus;
assert!(SessionStatus::new(0).is_ok());
assert!(SessionStatus::new(3).is_err());

Trait Implementations§

source§

impl Clone for SessionStatus

source§

fn clone(&self) -> SessionStatus

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for SessionStatus

source§

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

Formats the value using the given formatter. Read more
source§

impl PartialEq<SessionStatus> for SessionStatus

source§

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

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

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

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl Serialize for SessionStatus

source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
source§

impl Copy for SessionStatus

source§

impl Eq for SessionStatus

source§

impl StructuralEq for SessionStatus

source§

impl StructuralPartialEq for SessionStatus

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for Twhere T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere 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, U> Into<U> for Twhere 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> ToOwned for Twhere T: Clone,

§

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 Twhere U: Into<T>,

§

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 Twhere U: TryFrom<T>,

§

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.