pub struct Start<'packet> { /* private fields */ }Expand description
An authentication start packet, used to initiate an authentication session.
Implementations§
Source§impl<'packet> Start<'packet>
impl<'packet> Start<'packet>
Sourcepub fn new(
action: Action,
authentication: AuthenticationContext,
user_information: UserInformation<'packet>,
data: Option<PacketData<'packet>>,
) -> Result<Self, BadStart>
pub fn new( action: Action, authentication: AuthenticationContext, user_information: UserInformation<'packet>, data: Option<PacketData<'packet>>, ) -> Result<Self, BadStart>
Initializes a new start packet with the provided fields and an empty data field.
Trait Implementations§
Source§impl PacketBody for Start<'_>
impl PacketBody for Start<'_>
Source§const TYPE: PacketType = PacketType::Authentication
const TYPE: PacketType = PacketType::Authentication
Type of the packet (one of authentication, authorization, or accounting).
Source§const REQUIRED_FIELDS_LENGTH: usize = 8usize
const REQUIRED_FIELDS_LENGTH: usize = 8usize
Length of body just including required fields.
Source§fn required_minor_version(&self) -> Option<MinorVersion>
fn required_minor_version(&self) -> Option<MinorVersion>
Required protocol minor version based on the contents of the packet body. Read more
impl<'packet> Eq for Start<'packet>
impl<'packet> StructuralPartialEq for Start<'packet>
Auto Trait Implementations§
impl<'packet> Freeze for Start<'packet>
impl<'packet> RefUnwindSafe for Start<'packet>
impl<'packet> Send for Start<'packet>
impl<'packet> Sync for Start<'packet>
impl<'packet> Unpin for Start<'packet>
impl<'packet> UnwindSafe for Start<'packet>
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