Struct sbd::mo::Message [] [src]

pub struct Message { /* fields omitted */ }

A mobile-origined Iridium SBD message.

Messages can be ordered by time of session.

Methods

impl Message
[src]

Reads in a message from a file path.

Examples

use sbd::mo::Message;
let message = Message::from_path("data/0-mo.sbd").unwrap();

Reads in a message from an object that implements Read.

Per the specification, oversized and undersized messages will result in an error.

Examples

use std::fs::File;
use sbd::mo::Message;
let mut file = File::open("data/0-mo.sbd").unwrap();
let message = Message::read_from(file).unwrap();

Write this message back to a object that can Write.

Examples

use std::io::Cursor;
use sbd::mo::Message;
let message = Message::from_path("data/0-mo.sbd").unwrap();
let mut cursor = Cursor::new(Vec::new());
message.write_to(&mut cursor);

Returns this message's protocol revision number.

Returns this message's IMEI number as a string.

Returns this message's cdr reference number (also called auto id).

Returns this message's session status.

Returns this message's mobile originated message number.

Returns this message's mobile terminated message number.

Returns this message's time of session.

Returns a reference to this message's payload.

Returns this message's payload as a str.

Trait Implementations

impl Clone for Message
[src]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

impl Debug for Message
[src]

Formats the value using the given formatter.

impl Eq for Message
[src]

impl PartialEq for Message
[src]

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

impl Default for Message
[src]

Returns the "default value" for a type. Read more

impl PartialOrd for Message
[src]

This method returns an ordering between self and other values if one exists. Read more

This method tests less than (for self and other) and is used by the < operator. Read more

This method tests less than or equal to (for self and other) and is used by the <= operator. Read more

This method tests greater than (for self and other) and is used by the > operator. Read more

This method tests greater than or equal to (for self and other) and is used by the >= operator. Read more

impl Ord for Message
[src]

This method returns an Ordering between self and other. Read more