#[repr(i32)]pub enum SearchEntityKind {
Unspecified = 0,
User = 1,
Repo = 2,
Agent = 3,
Thread = 4,
Feed = 5,
}Expand description
Request-side scope filter only. The response has no entity-kind enum: the
SearchHit oneof tag IS the entity kind (no illegal kind/payload mismatch).
Variants§
Unspecified = 0
User = 1
Repo = 2
Agent = 3
Thread = 4
Feed = 5
6+ reserved for Tier 2: CONTENT, MESSAGE, STATE, SYMBOL.
Implementations§
Source§impl SearchEntityKind
impl SearchEntityKind
Sourcepub const fn is_valid(value: i32) -> bool
pub const fn is_valid(value: i32) -> bool
Returns true if value is a variant of SearchEntityKind.
Sourcepub fn from_i32(value: i32) -> Option<SearchEntityKind>
👎Deprecated: Use the TryFrom<i32> implementation instead
pub fn from_i32(value: i32) -> Option<SearchEntityKind>
Use the TryFrom<i32> implementation instead
Converts an i32 to a SearchEntityKind, or None if value is not a valid variant.
Source§impl SearchEntityKind
impl SearchEntityKind
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 SearchEntityKind
impl Clone for SearchEntityKind
Source§fn clone(&self) -> SearchEntityKind
fn clone(&self) -> SearchEntityKind
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 SearchEntityKind
Source§impl Debug for SearchEntityKind
impl Debug for SearchEntityKind
Source§impl Default for SearchEntityKind
impl Default for SearchEntityKind
Source§fn default() -> SearchEntityKind
fn default() -> SearchEntityKind
Returns the “default value” for a type. Read more
impl Eq for SearchEntityKind
Source§impl From<SearchEntityKind> for i32
impl From<SearchEntityKind> for i32
Source§fn from(value: SearchEntityKind) -> i32
fn from(value: SearchEntityKind) -> i32
Converts to this type from the input type.
Source§impl Hash for SearchEntityKind
impl Hash for SearchEntityKind
Source§impl Ord for SearchEntityKind
impl Ord for SearchEntityKind
Source§fn cmp(&self, other: &SearchEntityKind) -> Ordering
fn cmp(&self, other: &SearchEntityKind) -> 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 SearchEntityKind
impl PartialEq for SearchEntityKind
Source§impl PartialOrd for SearchEntityKind
impl PartialOrd for SearchEntityKind
impl StructuralPartialEq for SearchEntityKind
Source§impl TryFrom<i32> for SearchEntityKind
impl TryFrom<i32> for SearchEntityKind
Source§type Error = UnknownEnumValue
type Error = UnknownEnumValue
The type returned in the event of a conversion error.
Source§fn try_from(value: i32) -> Result<SearchEntityKind, UnknownEnumValue>
fn try_from(value: i32) -> Result<SearchEntityKind, UnknownEnumValue>
Performs the conversion.
Auto Trait Implementations§
impl Freeze for SearchEntityKind
impl RefUnwindSafe for SearchEntityKind
impl Send for SearchEntityKind
impl Sync for SearchEntityKind
impl Unpin for SearchEntityKind
impl UnsafeUnpin for SearchEntityKind
impl UnwindSafe for SearchEntityKind
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