#[non_exhaustive]pub struct OutputLimit { /* private fields */ }Expand description
Output size limits.
Implementations§
Source§impl OutputLimit
impl OutputLimit
Sourcepub fn new(
model_bytes: usize,
display_bytes: usize,
debug_bytes: usize,
) -> OutputLimit
pub fn new( model_bytes: usize, display_bytes: usize, debug_bytes: usize, ) -> OutputLimit
Constructs explicit output limits.
Sourcepub fn model_bytes(&self) -> usize
pub fn model_bytes(&self) -> usize
Maximum model-visible output bytes.
Sourcepub fn with_model_bytes(self, model_bytes: usize) -> OutputLimit
pub fn with_model_bytes(self, model_bytes: usize) -> OutputLimit
Returns limits with an updated model-visible byte cap.
Sourcepub fn display_bytes(&self) -> usize
pub fn display_bytes(&self) -> usize
Maximum display output bytes.
Sourcepub fn with_display_bytes(self, display_bytes: usize) -> OutputLimit
pub fn with_display_bytes(self, display_bytes: usize) -> OutputLimit
Returns limits with an updated display byte cap.
Sourcepub fn debug_bytes(&self) -> usize
pub fn debug_bytes(&self) -> usize
Maximum debug output bytes.
Sourcepub fn with_debug_bytes(self, debug_bytes: usize) -> OutputLimit
pub fn with_debug_bytes(self, debug_bytes: usize) -> OutputLimit
Returns limits with an updated debug byte cap.
Trait Implementations§
Source§impl Clone for OutputLimit
impl Clone for OutputLimit
Source§fn clone(&self) -> OutputLimit
fn clone(&self) -> OutputLimit
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 OutputLimit
impl Debug for OutputLimit
Source§impl Default for OutputLimit
impl Default for OutputLimit
Source§fn default() -> OutputLimit
fn default() -> OutputLimit
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for OutputLimitwhere
OutputLimit: Default,
impl<'de> Deserialize<'de> for OutputLimitwhere
OutputLimit: Default,
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<OutputLimit, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<OutputLimit, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for OutputLimit
Source§impl PartialEq for OutputLimit
impl PartialEq for OutputLimit
Source§impl Serialize for OutputLimit
impl Serialize for OutputLimit
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
impl StructuralPartialEq for OutputLimit
Auto Trait Implementations§
impl Freeze for OutputLimit
impl RefUnwindSafe for OutputLimit
impl Send for OutputLimit
impl Sync for OutputLimit
impl Unpin for OutputLimit
impl UnsafeUnpin for OutputLimit
impl UnwindSafe for OutputLimit
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,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
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.