pub struct BussHeader {
pub magic_number: u32,
pub version_major: u8,
pub version_minor: u8,
pub action: BussAction,
pub flags: u8,
}Expand description
The protocol header
Fields§
§magic_number: u32Set to 0x00042069. The server/client should check if the first 4 bytes matches these sequence. Otherwise should cancel the request and respond with an error. If you see this, we are bussin.
version_major: u8Bussin protocol version number. e.g. if currently at version 69.1 it will be the 69 part
version_minor: u8Bussing protocol version number minor. e.g. if currently at version 69.1 it will be the 1 part
action: BussActionAction the client wants executed or what response code the server replied with.
flags: u8Flags that describe the binary content of the protocol
Implementations§
Source§impl BussHeader
impl BussHeader
Sourcepub fn set_action(&mut self, action: BussAction)
pub fn set_action(&mut self, action: BussAction)
Sets the action to be performed
Trait Implementations§
Source§impl Default for BussHeader
impl Default for BussHeader
Auto Trait Implementations§
impl Freeze for BussHeader
impl RefUnwindSafe for BussHeader
impl Send for BussHeader
impl Sync for BussHeader
impl Unpin for BussHeader
impl UnwindSafe for BussHeader
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