Struct choices::warp::http::HeaderValue [−][src]
pub struct HeaderValue { /* fields omitted */ }
Represents an HTTP header field value.
In practice, HTTP header field values are usually valid ASCII. However, the HTTP spec allows for a header value to contain opaque bytes as well. In this case, the header field value is not able to be represented as a string.
To handle this, the HeaderValue
is useable as a type and can be compared
with strings and implements Debug
. A to_str
fn is provided that returns
an Err
if the header value contains non visible ascii characters.
Implementations
impl HeaderValue
[src]
impl HeaderValue
[src]pub fn from_static(src: &'static str) -> HeaderValue
[src]
pub fn from_static(src: &'static str) -> HeaderValue
[src]Convert a static string to a HeaderValue
.
This function will not perform any copying, however the string is checked to ensure that no invalid characters are present. Only visible ASCII characters (32-127) are permitted.
Panics
This function panics if the argument contains invalid header value characters.
Examples
let val = HeaderValue::from_static("hello"); assert_eq!(val, "hello");
pub fn from_str(src: &str) -> Result<HeaderValue, InvalidHeaderValue>
[src]
pub fn from_str(src: &str) -> Result<HeaderValue, InvalidHeaderValue>
[src]Attempt to convert a string to a HeaderValue
.
If the argument contains invalid header value characters, an error is
returned. Only visible ASCII characters (32-127) are permitted. Use
from_bytes
to create a HeaderValue
that includes opaque octets
(128-255).
This function is intended to be replaced in the future by a TryFrom
implementation once the trait is stabilized in std.
Examples
let val = HeaderValue::from_str("hello").unwrap(); assert_eq!(val, "hello");
An invalid value
let val = HeaderValue::from_str("\n"); assert!(val.is_err());
pub fn from_name(name: HeaderName) -> HeaderValue
[src]
pub fn from_name(name: HeaderName) -> HeaderValue
[src]Converts a HeaderName into a HeaderValue
Since every valid HeaderName is a valid HeaderValue this is done infallibly.
Examples
let val = HeaderValue::from_name(ACCEPT); assert_eq!(val, HeaderValue::from_bytes(b"accept").unwrap());
pub fn from_bytes(src: &[u8]) -> Result<HeaderValue, InvalidHeaderValue>
[src]
pub fn from_bytes(src: &[u8]) -> Result<HeaderValue, InvalidHeaderValue>
[src]Attempt to convert a byte slice to a HeaderValue
.
If the argument contains invalid header value bytes, an error is returned. Only byte values between 32 and 255 (inclusive) are permitted, excluding byte 127 (DEL).
This function is intended to be replaced in the future by a TryFrom
implementation once the trait is stabilized in std.
Examples
let val = HeaderValue::from_bytes(b"hello\xfa").unwrap(); assert_eq!(val, &b"hello\xfa"[..]);
An invalid value
let val = HeaderValue::from_bytes(b"\n"); assert!(val.is_err());
pub fn from_maybe_shared<T>(src: T) -> Result<HeaderValue, InvalidHeaderValue> where
T: AsRef<[u8]> + 'static,
[src]
pub fn from_maybe_shared<T>(src: T) -> Result<HeaderValue, InvalidHeaderValue> where
T: AsRef<[u8]> + 'static,
[src]Attempt to convert a Bytes
buffer to a HeaderValue
.
This will try to prevent a copy if the type passed is the type used internally, and will copy the data if it is not.
pub unsafe fn from_maybe_shared_unchecked<T>(src: T) -> HeaderValue where
T: AsRef<[u8]> + 'static,
[src]
pub unsafe fn from_maybe_shared_unchecked<T>(src: T) -> HeaderValue where
T: AsRef<[u8]> + 'static,
[src]Convert a Bytes
directly into a HeaderValue
without validating.
This function does NOT validate that illegal bytes are not contained within the buffer.
pub fn to_str(&self) -> Result<&str, ToStrError>
[src]
pub fn to_str(&self) -> Result<&str, ToStrError>
[src]Yields a &str
slice if the HeaderValue
only contains visible ASCII
chars.
This function will perform a scan of the header value, checking all the characters.
Examples
let val = HeaderValue::from_static("hello"); assert_eq!(val.to_str().unwrap(), "hello");
pub fn len(&self) -> usize
[src]
pub fn len(&self) -> usize
[src]Returns the length of self
.
This length is in bytes.
Examples
let val = HeaderValue::from_static("hello"); assert_eq!(val.len(), 5);
pub fn is_empty(&self) -> bool
[src]
pub fn is_empty(&self) -> bool
[src]Returns true if the HeaderValue
has a length of zero bytes.
Examples
let val = HeaderValue::from_static(""); assert!(val.is_empty()); let val = HeaderValue::from_static("hello"); assert!(!val.is_empty());
pub fn as_bytes(&self) -> &[u8]ⓘ
[src]
pub fn as_bytes(&self) -> &[u8]ⓘ
[src]Converts a HeaderValue
to a byte slice.
Examples
let val = HeaderValue::from_static("hello"); assert_eq!(val.as_bytes(), b"hello");
pub fn set_sensitive(&mut self, val: bool)
[src]
pub fn set_sensitive(&mut self, val: bool)
[src]Mark that the header value represents sensitive information.
Examples
let mut val = HeaderValue::from_static("my secret"); val.set_sensitive(true); assert!(val.is_sensitive()); val.set_sensitive(false); assert!(!val.is_sensitive());
pub fn is_sensitive(&self) -> bool
[src]
pub fn is_sensitive(&self) -> bool
[src]Returns true
if the value represents sensitive data.
Sensitive data could represent passwords or other data that should not be stored on disk or in memory. By marking header values as sensitive, components using this crate can be instructed to treat them with special care for security reasons. For example, caches can avoid storing sensitive values, and HPACK encoders used by HTTP/2.0 implementations can choose not to compress them.
Additionally, sensitive values will be masked by the Debug
implementation of HeaderValue
.
Note that sensitivity is not factored into equality or ordering.
Examples
let mut val = HeaderValue::from_static("my secret"); val.set_sensitive(true); assert!(val.is_sensitive()); val.set_sensitive(false); assert!(!val.is_sensitive());
Trait Implementations
impl Clone for HeaderValue
[src]
impl Clone for HeaderValue
[src]pub fn clone(&self) -> HeaderValue
[src]
pub fn clone(&self) -> HeaderValue
[src]Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]Performs copy-assignment from source
. Read more
impl Debug for HeaderValue
[src]
impl Debug for HeaderValue
[src]impl<'a> From<&'a After> for HeaderValue
[src]
impl<'a> From<&'a After> for HeaderValue
[src]pub fn from(after: &'a After) -> HeaderValue
[src]
pub fn from(after: &'a After) -> HeaderValue
[src]Performs the conversion.
impl<'a> From<&'a EntityTag<HeaderValue>> for HeaderValue
[src]
impl<'a> From<&'a EntityTag<HeaderValue>> for HeaderValue
[src]pub fn from(tag: &'a EntityTag<HeaderValue>) -> HeaderValue
[src]
pub fn from(tag: &'a EntityTag<HeaderValue>) -> HeaderValue
[src]Performs the conversion.
impl<'a> From<&'a EntityTagRange> for HeaderValue
[src]
impl<'a> From<&'a EntityTagRange> for HeaderValue
[src]pub fn from(tag: &'a EntityTagRange) -> HeaderValue
[src]
pub fn from(tag: &'a EntityTagRange) -> HeaderValue
[src]Performs the conversion.
impl<'a, Sep> From<&'a FlatCsv<Sep>> for HeaderValue
[src]
impl<'a, Sep> From<&'a FlatCsv<Sep>> for HeaderValue
[src]pub fn from(flat: &'a FlatCsv<Sep>) -> HeaderValue
[src]
pub fn from(flat: &'a FlatCsv<Sep>) -> HeaderValue
[src]Performs the conversion.
impl<'a> From<&'a HeaderValue> for HeaderValue
[src]
impl<'a> From<&'a HeaderValue> for HeaderValue
[src]pub fn from(t: &'a HeaderValue) -> HeaderValue
[src]
pub fn from(t: &'a HeaderValue) -> HeaderValue
[src]Performs the conversion.
impl<'a> From<&'a HeaderValueString> for HeaderValue
[src]
impl<'a> From<&'a HeaderValueString> for HeaderValue
[src]pub fn from(src: &'a HeaderValueString) -> HeaderValue
[src]
pub fn from(src: &'a HeaderValueString) -> HeaderValue
[src]Performs the conversion.
impl<'a> From<&'a HttpDate> for HeaderValue
[src]
impl<'a> From<&'a HttpDate> for HeaderValue
[src]pub fn from(date: &'a HttpDate) -> HeaderValue
[src]
pub fn from(date: &'a HttpDate) -> HeaderValue
[src]Performs the conversion.
impl<'a> From<&'a IfRange_> for HeaderValue
[src]
impl<'a> From<&'a IfRange_> for HeaderValue
[src]pub fn from(if_range: &'a IfRange_) -> HeaderValue
[src]
pub fn from(if_range: &'a IfRange_) -> HeaderValue
[src]Performs the conversion.
impl<'a> From<&'a OriginOrAny> for HeaderValue
[src]
impl<'a> From<&'a OriginOrAny> for HeaderValue
[src]pub fn from(origin: &'a OriginOrAny) -> HeaderValue
[src]
pub fn from(origin: &'a OriginOrAny) -> HeaderValue
[src]Performs the conversion.
impl<'a> From<&'a OriginOrNull> for HeaderValue
[src]
impl<'a> From<&'a OriginOrNull> for HeaderValue
[src]pub fn from(origin: &'a OriginOrNull) -> HeaderValue
[src]
pub fn from(origin: &'a OriginOrNull) -> HeaderValue
[src]Performs the conversion.
impl<'a> From<&'a Policy> for HeaderValue
[src]
impl<'a> From<&'a Policy> for HeaderValue
[src]pub fn from(policy: &'a Policy) -> HeaderValue
[src]
pub fn from(policy: &'a Policy) -> HeaderValue
[src]Performs the conversion.
impl<'a> From<&'a Seconds> for HeaderValue
[src]
impl<'a> From<&'a Seconds> for HeaderValue
[src]pub fn from(secs: &'a Seconds) -> HeaderValue
[src]
pub fn from(secs: &'a Seconds) -> HeaderValue
[src]Performs the conversion.
impl From<EntityTag<HeaderValue>> for HeaderValue
[src]
impl From<EntityTag<HeaderValue>> for HeaderValue
[src]pub fn from(tag: EntityTag<HeaderValue>) -> HeaderValue
[src]
pub fn from(tag: EntityTag<HeaderValue>) -> HeaderValue
[src]Performs the conversion.
impl From<HeaderName> for HeaderValue
[src]
impl From<HeaderName> for HeaderValue
[src]pub fn from(h: HeaderName) -> HeaderValue
[src]
pub fn from(h: HeaderName) -> HeaderValue
[src]Performs the conversion.
impl From<HttpDate> for HeaderValue
[src]
impl From<HttpDate> for HeaderValue
[src]pub fn from(date: HttpDate) -> HeaderValue
[src]
pub fn from(date: HttpDate) -> HeaderValue
[src]Performs the conversion.
impl From<i16> for HeaderValue
[src]
impl From<i16> for HeaderValue
[src]pub fn from(num: i16) -> HeaderValue
[src]
pub fn from(num: i16) -> HeaderValue
[src]Performs the conversion.
impl From<i32> for HeaderValue
[src]
impl From<i32> for HeaderValue
[src]pub fn from(num: i32) -> HeaderValue
[src]
pub fn from(num: i32) -> HeaderValue
[src]Performs the conversion.
impl From<i64> for HeaderValue
[src]
impl From<i64> for HeaderValue
[src]pub fn from(num: i64) -> HeaderValue
[src]
pub fn from(num: i64) -> HeaderValue
[src]Performs the conversion.
impl From<isize> for HeaderValue
[src]
impl From<isize> for HeaderValue
[src]pub fn from(num: isize) -> HeaderValue
[src]
pub fn from(num: isize) -> HeaderValue
[src]Performs the conversion.
impl From<u16> for HeaderValue
[src]
impl From<u16> for HeaderValue
[src]pub fn from(num: u16) -> HeaderValue
[src]
pub fn from(num: u16) -> HeaderValue
[src]Performs the conversion.
impl From<u32> for HeaderValue
[src]
impl From<u32> for HeaderValue
[src]pub fn from(num: u32) -> HeaderValue
[src]
pub fn from(num: u32) -> HeaderValue
[src]Performs the conversion.
impl From<u64> for HeaderValue
[src]
impl From<u64> for HeaderValue
[src]pub fn from(num: u64) -> HeaderValue
[src]
pub fn from(num: u64) -> HeaderValue
[src]Performs the conversion.
impl From<usize> for HeaderValue
[src]
impl From<usize> for HeaderValue
[src]pub fn from(num: usize) -> HeaderValue
[src]
pub fn from(num: usize) -> HeaderValue
[src]Performs the conversion.
impl FromStr for HeaderValue
[src]
impl FromStr for HeaderValue
[src]type Err = InvalidHeaderValue
type Err = InvalidHeaderValue
The associated error which can be returned from parsing.
pub fn from_str(s: &str) -> Result<HeaderValue, <HeaderValue as FromStr>::Err>
[src]
pub fn from_str(s: &str) -> Result<HeaderValue, <HeaderValue as FromStr>::Err>
[src]Parses a string s
to return a value of this type. Read more
impl Hash for HeaderValue
[src]
impl Hash for HeaderValue
[src]impl Ord for HeaderValue
[src]
impl Ord for HeaderValue
[src]impl<'a, T> PartialEq<&'a T> for HeaderValue where
T: ?Sized,
HeaderValue: PartialEq<T>,
[src]
impl<'a, T> PartialEq<&'a T> for HeaderValue where
T: ?Sized,
HeaderValue: PartialEq<T>,
[src]impl<'a> PartialEq<HeaderValue> for &'a HeaderValue
[src]
impl<'a> PartialEq<HeaderValue> for &'a HeaderValue
[src]impl PartialEq<HeaderValue> for HeaderValue
[src]
impl PartialEq<HeaderValue> for HeaderValue
[src]impl PartialEq<String> for HeaderValue
[src]
impl PartialEq<String> for HeaderValue
[src]impl PartialEq<str> for HeaderValue
[src]
impl PartialEq<str> for HeaderValue
[src]impl<'a, T> PartialOrd<&'a T> for HeaderValue where
T: ?Sized,
HeaderValue: PartialOrd<T>,
[src]
impl<'a, T> PartialOrd<&'a T> for HeaderValue where
T: ?Sized,
HeaderValue: PartialOrd<T>,
[src]pub fn partial_cmp(&self, other: &&'a T) -> Option<Ordering>
[src]
pub fn partial_cmp(&self, other: &&'a T) -> Option<Ordering>
[src]This method returns an ordering between self
and other
values if one exists. Read more
#[must_use]fn lt(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]fn lt(&self, other: &Rhs) -> bool
1.0.0[src]This method tests less than (for self
and other
) and is used by the <
operator. Read more
#[must_use]fn le(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]fn le(&self, other: &Rhs) -> bool
1.0.0[src]This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
impl PartialOrd<[u8]> for HeaderValue
[src]
impl PartialOrd<[u8]> for HeaderValue
[src]pub fn partial_cmp(&self, other: &[u8]) -> Option<Ordering>
[src]
pub fn partial_cmp(&self, other: &[u8]) -> Option<Ordering>
[src]This method returns an ordering between self
and other
values if one exists. Read more
#[must_use]fn lt(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]fn lt(&self, other: &Rhs) -> bool
1.0.0[src]This method tests less than (for self
and other
) and is used by the <
operator. Read more
#[must_use]fn le(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]fn le(&self, other: &Rhs) -> bool
1.0.0[src]This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
impl PartialOrd<HeaderValue> for HeaderValue
[src]
impl PartialOrd<HeaderValue> for HeaderValue
[src]pub fn partial_cmp(&self, other: &HeaderValue) -> Option<Ordering>
[src]
pub fn partial_cmp(&self, other: &HeaderValue) -> Option<Ordering>
[src]This method returns an ordering between self
and other
values if one exists. Read more
#[must_use]fn lt(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]fn lt(&self, other: &Rhs) -> bool
1.0.0[src]This method tests less than (for self
and other
) and is used by the <
operator. Read more
#[must_use]fn le(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]fn le(&self, other: &Rhs) -> bool
1.0.0[src]This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
impl PartialOrd<HeaderValue> for [u8]
[src]
impl PartialOrd<HeaderValue> for [u8]
[src]pub fn partial_cmp(&self, other: &HeaderValue) -> Option<Ordering>
[src]
pub fn partial_cmp(&self, other: &HeaderValue) -> Option<Ordering>
[src]This method returns an ordering between self
and other
values if one exists. Read more
#[must_use]fn lt(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]fn lt(&self, other: &Rhs) -> bool
1.0.0[src]This method tests less than (for self
and other
) and is used by the <
operator. Read more
#[must_use]fn le(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]fn le(&self, other: &Rhs) -> bool
1.0.0[src]This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
impl<'a> PartialOrd<HeaderValue> for &'a HeaderValue
[src]
impl<'a> PartialOrd<HeaderValue> for &'a HeaderValue
[src]pub fn partial_cmp(&self, other: &HeaderValue) -> Option<Ordering>
[src]
pub fn partial_cmp(&self, other: &HeaderValue) -> Option<Ordering>
[src]This method returns an ordering between self
and other
values if one exists. Read more
#[must_use]fn lt(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]fn lt(&self, other: &Rhs) -> bool
1.0.0[src]This method tests less than (for self
and other
) and is used by the <
operator. Read more
#[must_use]fn le(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]fn le(&self, other: &Rhs) -> bool
1.0.0[src]This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
impl PartialOrd<String> for HeaderValue
[src]
impl PartialOrd<String> for HeaderValue
[src]pub fn partial_cmp(&self, other: &String) -> Option<Ordering>
[src]
pub fn partial_cmp(&self, other: &String) -> Option<Ordering>
[src]This method returns an ordering between self
and other
values if one exists. Read more
#[must_use]fn lt(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]fn lt(&self, other: &Rhs) -> bool
1.0.0[src]This method tests less than (for self
and other
) and is used by the <
operator. Read more
#[must_use]fn le(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]fn le(&self, other: &Rhs) -> bool
1.0.0[src]This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
impl PartialOrd<str> for HeaderValue
[src]
impl PartialOrd<str> for HeaderValue
[src]pub fn partial_cmp(&self, other: &str) -> Option<Ordering>
[src]
pub fn partial_cmp(&self, other: &str) -> Option<Ordering>
[src]This method returns an ordering between self
and other
values if one exists. Read more
#[must_use]fn lt(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]fn lt(&self, other: &Rhs) -> bool
1.0.0[src]This method tests less than (for self
and other
) and is used by the <
operator. Read more
#[must_use]fn le(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]fn le(&self, other: &Rhs) -> bool
1.0.0[src]This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
impl<'a> TryFrom<&'a [u8]> for HeaderValue
[src]
impl<'a> TryFrom<&'a [u8]> for HeaderValue
[src]type Error = InvalidHeaderValue
type Error = InvalidHeaderValue
The type returned in the event of a conversion error.
impl<'a> TryFrom<&'a String> for HeaderValue
[src]
impl<'a> TryFrom<&'a String> for HeaderValue
[src]type Error = InvalidHeaderValue
type Error = InvalidHeaderValue
The type returned in the event of a conversion error.
pub fn try_from(
s: &'a String
) -> Result<HeaderValue, <HeaderValue as TryFrom<&'a String>>::Error>
[src]
pub fn try_from(
s: &'a String
) -> Result<HeaderValue, <HeaderValue as TryFrom<&'a String>>::Error>
[src]Performs the conversion.
impl<'a> TryFrom<&'a str> for HeaderValue
[src]
impl<'a> TryFrom<&'a str> for HeaderValue
[src]type Error = InvalidHeaderValue
type Error = InvalidHeaderValue
The type returned in the event of a conversion error.
pub fn try_from(
t: &'a str
) -> Result<HeaderValue, <HeaderValue as TryFrom<&'a str>>::Error>
[src]
pub fn try_from(
t: &'a str
) -> Result<HeaderValue, <HeaderValue as TryFrom<&'a str>>::Error>
[src]Performs the conversion.
impl TryFrom<String> for HeaderValue
[src]
impl TryFrom<String> for HeaderValue
[src]type Error = InvalidHeaderValue
type Error = InvalidHeaderValue
The type returned in the event of a conversion error.
pub fn try_from(
t: String
) -> Result<HeaderValue, <HeaderValue as TryFrom<String>>::Error>
[src]
pub fn try_from(
t: String
) -> Result<HeaderValue, <HeaderValue as TryFrom<String>>::Error>
[src]Performs the conversion.
impl TryFrom<Vec<u8, Global>> for HeaderValue
[src]
impl TryFrom<Vec<u8, Global>> for HeaderValue
[src]type Error = InvalidHeaderValue
type Error = InvalidHeaderValue
The type returned in the event of a conversion error.
impl Eq for HeaderValue
[src]
Auto Trait Implementations
impl RefUnwindSafe for HeaderValue
impl Send for HeaderValue
impl Sync for HeaderValue
impl Unpin for HeaderValue
impl UnwindSafe for HeaderValue
Blanket Implementations
impl<Q, K> Equivalent<K> for Q where
K: Borrow<Q> + ?Sized,
Q: Eq + ?Sized,
[src]
impl<Q, K> Equivalent<K> for Q where
K: Borrow<Q> + ?Sized,
Q: Eq + ?Sized,
[src]pub fn equivalent(&self, key: &K) -> bool
[src]
pub fn equivalent(&self, key: &K) -> bool
[src]Compare self to key
and return true
if they are equal.
impl<T> Instrument for T
[src]
impl<T> Instrument for T
[src]fn instrument(self, span: Span) -> Instrumented<Self>ⓘNotable traits for Instrumented<T>
impl<T> Future for Instrumented<T> where
T: Future, type Output = <T as Future>::Output;
[src]
fn instrument(self, span: Span) -> Instrumented<Self>ⓘNotable traits for Instrumented<T>
impl<T> Future for Instrumented<T> where
T: Future, type Output = <T as Future>::Output;
[src]Instruments this type with the provided Span
, returning an
Instrumented
wrapper. Read more
fn in_current_span(self) -> Instrumented<Self>ⓘNotable traits for Instrumented<T>
impl<T> Future for Instrumented<T> where
T: Future, type Output = <T as Future>::Output;
[src]
fn in_current_span(self) -> Instrumented<Self>ⓘNotable traits for Instrumented<T>
impl<T> Future for Instrumented<T> where
T: Future, type Output = <T as Future>::Output;
[src]impl<T> Instrument for T
[src]
impl<T> Instrument for T
[src]fn instrument(self, span: Span) -> Instrumented<Self>ⓘNotable traits for Instrumented<T>
impl<T> Future for Instrumented<T> where
T: Future, type Output = <T as Future>::Output;
[src]
fn instrument(self, span: Span) -> Instrumented<Self>ⓘNotable traits for Instrumented<T>
impl<T> Future for Instrumented<T> where
T: Future, type Output = <T as Future>::Output;
[src]Instruments this type with the provided Span
, returning an
Instrumented
wrapper. Read more
fn in_current_span(self) -> Instrumented<Self>ⓘNotable traits for Instrumented<T>
impl<T> Future for Instrumented<T> where
T: Future, type Output = <T as Future>::Output;
[src]
fn in_current_span(self) -> Instrumented<Self>ⓘNotable traits for Instrumented<T>
impl<T> Future for Instrumented<T> where
T: Future, type Output = <T as Future>::Output;
[src]impl<T> Same<T> for T
impl<T> Same<T> for T
type Output = T
type Output = T
Should always be Self
impl<T> ToOwned for T where
T: Clone,
[src]
impl<T> ToOwned for T where
T: Clone,
[src]type Owned = T
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn to_owned(&self) -> T
[src]Creates owned data from borrowed data, usually by cloning. Read more
pub fn clone_into(&self, target: &mut T)
[src]
pub fn clone_into(&self, target: &mut T)
[src]🔬 This is a nightly-only experimental API. (toowned_clone_into
)
recently added
Uses borrowed data to replace owned data, usually by cloning. Read more
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
impl<V, T> VZip<V> for T where
V: MultiLane<T>,