s2n-quic-core 0.81.0

Internal crate used by s2n-quic
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
// SPDX-License-Identifier: Apache-2.0

use alloc::collections::VecDeque;

impl super::Storage for VecDeque<u8> {
    #[inline]
    fn put_slice(&mut self, bytes: &[u8]) {
        self.extend(bytes);
    }

    #[inline]
    fn remaining_capacity(&self) -> usize {
        (isize::MAX as usize) - self.len()
    }
}