#[repr(i32)]pub enum StreamPurpose {
Unspecified = 0,
Generic = 1,
HttpRequestBody = 2,
HttpResponseBody = 3,
BulkTransfer = 4,
Mcp = 5,
}Variants§
Implementations§
Source§impl StreamPurpose
impl StreamPurpose
Source§impl StreamPurpose
impl StreamPurpose
Sourcepub fn as_str_name(&self) -> &'static str
pub fn as_str_name(&self) -> &'static str
String value of the enum field names used in the ProtoBuf definition.
The values are not transformed in any way and thus are considered stable (if the ProtoBuf definition does not change) and safe for programmatic use.
Sourcepub fn from_str_name(value: &str) -> Option<Self>
pub fn from_str_name(value: &str) -> Option<Self>
Creates an enum from field names used in the ProtoBuf definition.
Trait Implementations§
Source§impl Clone for StreamPurpose
impl Clone for StreamPurpose
Source§fn clone(&self) -> StreamPurpose
fn clone(&self) -> StreamPurpose
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 StreamPurpose
Source§impl Debug for StreamPurpose
impl Debug for StreamPurpose
Source§impl Default for StreamPurpose
impl Default for StreamPurpose
Source§fn default() -> StreamPurpose
fn default() -> StreamPurpose
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for StreamPurpose
impl<'de> Deserialize<'de> for StreamPurpose
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for StreamPurpose
Source§impl From<StreamPurpose> for i32
impl From<StreamPurpose> for i32
Source§fn from(value: StreamPurpose) -> i32
fn from(value: StreamPurpose) -> i32
Converts to this type from the input type.
Source§impl Hash for StreamPurpose
impl Hash for StreamPurpose
Source§impl Ord for StreamPurpose
impl Ord for StreamPurpose
Source§fn cmp(&self, other: &StreamPurpose) -> Ordering
fn cmp(&self, other: &StreamPurpose) -> Ordering
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl PartialEq for StreamPurpose
impl PartialEq for StreamPurpose
Source§impl PartialOrd for StreamPurpose
impl PartialOrd for StreamPurpose
Source§impl Serialize for StreamPurpose
impl Serialize for StreamPurpose
impl StructuralPartialEq for StreamPurpose
Source§impl TryFrom<i32> for StreamPurpose
impl TryFrom<i32> for StreamPurpose
Source§type Error = UnknownEnumValue
type Error = UnknownEnumValue
The type returned in the event of a conversion error.
Source§fn try_from(value: i32) -> Result<StreamPurpose, UnknownEnumValue>
fn try_from(value: i32) -> Result<StreamPurpose, UnknownEnumValue>
Performs the conversion.
Auto Trait Implementations§
impl Freeze for StreamPurpose
impl RefUnwindSafe for StreamPurpose
impl Send for StreamPurpose
impl Sync for StreamPurpose
impl Unpin for StreamPurpose
impl UnsafeUnpin for StreamPurpose
impl UnwindSafe for StreamPurpose
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