pub struct SegmentationInfo {
pub more_follows: bool,
pub segmented_response_accepted: bool,
pub max_segments_accepted: u8,
pub max_apdu_length_accepted: u16,
pub sequence_number: u8,
pub proposed_window_size: u8,
}Expand description
Segmentation information for large APDUs
Fields§
§more_follows: boolMore follows flag
segmented_response_accepted: boolSegmented response accepted flag
max_segments_accepted: u8Maximum segments accepted (0 = unspecified, 2-127)
max_apdu_length_accepted: u16Maximum APDU length accepted
sequence_number: u8Sequence number (0-255)
proposed_window_size: u8Proposed window size (1-127)
Implementations§
Source§impl SegmentationInfo
impl SegmentationInfo
Sourcepub fn new(
more_follows: bool,
segmented_response_accepted: bool,
max_segments_accepted: u8,
max_apdu_length_accepted: u16,
sequence_number: u8,
proposed_window_size: u8,
) -> Self
pub fn new( more_follows: bool, segmented_response_accepted: bool, max_segments_accepted: u8, max_apdu_length_accepted: u16, sequence_number: u8, proposed_window_size: u8, ) -> Self
Create new segmentation info
Sourcepub fn is_first_segment(&self) -> bool
pub fn is_first_segment(&self) -> bool
Check if this is the first segment
Sourcepub fn is_last_segment(&self) -> bool
pub fn is_last_segment(&self) -> bool
Check if this is the last segment
Sourcepub fn max_segment_size(&self) -> usize
pub fn max_segment_size(&self) -> usize
Calculate the maximum segment size based on max APDU length
Trait Implementations§
Source§impl Clone for SegmentationInfo
impl Clone for SegmentationInfo
Source§fn clone(&self) -> SegmentationInfo
fn clone(&self) -> SegmentationInfo
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 SegmentationInfo
impl Debug for SegmentationInfo
impl Eq for SegmentationInfo
Source§impl PartialEq for SegmentationInfo
impl PartialEq for SegmentationInfo
Source§fn eq(&self, other: &SegmentationInfo) -> bool
fn eq(&self, other: &SegmentationInfo) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for SegmentationInfo
Auto Trait Implementations§
impl Freeze for SegmentationInfo
impl RefUnwindSafe for SegmentationInfo
impl Send for SegmentationInfo
impl Sync for SegmentationInfo
impl Unpin for SegmentationInfo
impl UnsafeUnpin for SegmentationInfo
impl UnwindSafe for SegmentationInfo
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