#[repr(i32)]pub enum RelationFormat {
Show 14 variants
Longtext = 0,
Shorttext = 1,
Number = 2,
Status = 3,
Tag = 11,
Date = 4,
File = 5,
Checkbox = 6,
Url = 7,
Email = 8,
Phone = 9,
Emoji = 10,
Object = 100,
Relations = 101,
}Expand description
RelationFormat describes how the underlying data is stored in the google.protobuf.Value and how it should be validated/sanitized
Variants§
Longtext = 0
string
Shorttext = 1
string, usually short enough. May be truncated in the future
Number = 2
double
Status = 3
string or list of string(len==1)
Tag = 11
list of string (choose multiple from a list)
Date = 4
float64(pb.Value doesn’t have int64) or the string
File = 5
relation can has objects of specific types: file, image, audio, video
Checkbox = 6
boolean
Url = 7
string with sanity check
Email = 8
string with sanity check
Phone = 9
string with sanity check
Emoji = 10
one emoji, can contains multiple utf-8 symbols
Object = 100
relation can has objectType to specify objectType
Relations = 101
base64-encoded relation pb model
Implementations§
Source§impl RelationFormat
impl RelationFormat
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 RelationFormat
impl Clone for RelationFormat
Source§fn clone(&self) -> RelationFormat
fn clone(&self) -> RelationFormat
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for RelationFormat
impl Debug for RelationFormat
Source§impl Default for RelationFormat
impl Default for RelationFormat
Source§fn default() -> RelationFormat
fn default() -> RelationFormat
Source§impl From<RelationFormat> for i32
impl From<RelationFormat> for i32
Source§fn from(value: RelationFormat) -> i32
fn from(value: RelationFormat) -> i32
Source§impl Hash for RelationFormat
impl Hash for RelationFormat
Source§impl Ord for RelationFormat
impl Ord for RelationFormat
Source§fn cmp(&self, other: &RelationFormat) -> Ordering
fn cmp(&self, other: &RelationFormat) -> Ordering
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Source§impl PartialEq for RelationFormat
impl PartialEq for RelationFormat
Source§impl PartialOrd for RelationFormat
impl PartialOrd for RelationFormat
Source§impl TryFrom<i32> for RelationFormat
impl TryFrom<i32> for RelationFormat
Source§type Error = UnknownEnumValue
type Error = UnknownEnumValue
Source§fn try_from(value: i32) -> Result<RelationFormat, UnknownEnumValue>
fn try_from(value: i32) -> Result<RelationFormat, UnknownEnumValue>
impl Copy for RelationFormat
impl Eq for RelationFormat
impl StructuralPartialEq for RelationFormat
Auto Trait Implementations§
impl Freeze for RelationFormat
impl RefUnwindSafe for RelationFormat
impl Send for RelationFormat
impl Sync for RelationFormat
impl Unpin for RelationFormat
impl UnsafeUnpin for RelationFormat
impl UnwindSafe for RelationFormat
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
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
key and return true if they are equal.Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a tonic::Request