pub struct StatusLine {
pub version: i32,
pub code: i32,
pub message: String,
}Expand description
A status line, such as LSL/110 200 OK.
Fields§
§version: i32The protocol version that the other side runs.
code: i32The status code.
message: StringThe message after the code. It can hold spaces.
Implementations§
Source§impl StatusLine
impl StatusLine
Sourcepub fn parse(line: &str) -> Result<Self, Error>
pub fn parse(line: &str) -> Result<Self, Error>
Read a status line.
liblsl splits on spaces and needs three parts. The first part starts
with LSL/ (src/data_receiver.cpp:196-199).
Sourcepub fn action(&self) -> StatusAction
pub fn action(&self) -> StatusAction
What a client does with this code. SPEC.md 4.5.
liblsl checks ranges and not exact values
(src/data_receiver.cpp:207-212). The order matters: 404 comes before
the test for 400 and above.
Trait Implementations§
Source§impl Clone for StatusLine
impl Clone for StatusLine
Source§fn clone(&self) -> StatusLine
fn clone(&self) -> StatusLine
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for StatusLine
impl Debug for StatusLine
impl Eq for StatusLine
Source§impl PartialEq for StatusLine
impl PartialEq for StatusLine
impl StructuralPartialEq for StatusLine
Auto Trait Implementations§
impl Freeze for StatusLine
impl RefUnwindSafe for StatusLine
impl Send for StatusLine
impl Sync for StatusLine
impl Unpin for StatusLine
impl UnsafeUnpin for StatusLine
impl UnwindSafe for StatusLine
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