pub struct TransportLimits { /* private fields */ }Expand description
Bounded metadata, pagination, and artifact-download policy.
Implementations§
Source§impl TransportLimits
impl TransportLimits
Sourcepub fn new(
pages: u16,
per_page: u8,
api_response_bytes: usize,
artifact_bytes: u64,
api_timeout: Duration,
download_timeout: Duration,
) -> Result<Self, TransportConfigError>
pub fn new( pages: u16, per_page: u8, api_response_bytes: usize, artifact_bytes: u64, api_timeout: Duration, download_timeout: Duration, ) -> Result<Self, TransportConfigError>
Construct transport limits.
§Errors
Rejects zero, GitHub pagination values above 100, response buffers above 16 MiB, artifact bounds above 2 GiB, and timeouts above one hour.
Sourcepub fn secure_defaults() -> Self
pub fn secure_defaults() -> Self
Conservative defaults: ten 100-item pages, 2 MiB API responses, 512 MiB artifacts, one-minute API calls, and ten-minute downloads.
§Panics
This cannot panic because all constants satisfy the constructor bounds.
Sourcepub const fn artifact_bytes(self) -> u64
pub const fn artifact_bytes(self) -> u64
Maximum artifact download size.
Trait Implementations§
Source§impl Clone for TransportLimits
impl Clone for TransportLimits
impl Copy for TransportLimits
Source§impl Debug for TransportLimits
impl Debug for TransportLimits
impl Eq for TransportLimits
Source§impl PartialEq for TransportLimits
impl PartialEq for TransportLimits
impl StructuralPartialEq for TransportLimits
Auto Trait Implementations§
impl Freeze for TransportLimits
impl RefUnwindSafe for TransportLimits
impl Send for TransportLimits
impl Sync for TransportLimits
impl Unpin for TransportLimits
impl UnsafeUnpin for TransportLimits
impl UnwindSafe for TransportLimits
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.