pub struct SegmentLayout { /* private fields */ }Expand description
Offsets and lengths for one segment in a MessageLayout.
Implementations§
Source§impl SegmentLayout
impl SegmentLayout
Sourcepub const fn plaintext_offset(self) -> u64
pub const fn plaintext_offset(self) -> u64
Returns this segment’s byte offset in the complete plaintext.
Sourcepub const fn plaintext_length(self) -> usize
pub const fn plaintext_length(self) -> usize
Returns this segment’s plaintext length.
Sourcepub const fn ciphertext_offset(self) -> u64
pub const fn ciphertext_offset(self) -> u64
Returns this segment’s byte offset in the complete ciphertext, including the FLOE header.
Sourcepub const fn ciphertext_length(self) -> usize
pub const fn ciphertext_length(self) -> usize
Returns this segment’s ciphertext length.
Sourcepub const fn kind(self) -> SegmentKind
pub const fn kind(self) -> SegmentKind
Returns whether this is an internal or final segment.
Trait Implementations§
Source§impl Clone for SegmentLayout
impl Clone for SegmentLayout
Source§fn clone(&self) -> SegmentLayout
fn clone(&self) -> SegmentLayout
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 moreimpl Copy for SegmentLayout
Source§impl Debug for SegmentLayout
impl Debug for SegmentLayout
impl Eq for SegmentLayout
Source§impl PartialEq for SegmentLayout
impl PartialEq for SegmentLayout
impl StructuralPartialEq for SegmentLayout
Auto Trait Implementations§
impl Freeze for SegmentLayout
impl RefUnwindSafe for SegmentLayout
impl Send for SegmentLayout
impl Sync for SegmentLayout
impl Unpin for SegmentLayout
impl UnsafeUnpin for SegmentLayout
impl UnwindSafe for SegmentLayout
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