Enum prost_types::field_options::JsType
source · #[repr(i32)]pub enum JsType {
JsNormal = 0,
JsString = 1,
JsNumber = 2,
}
Variants§
JsNormal = 0
Use the default type.
JsString = 1
Use JavaScript strings.
JsNumber = 2
Use JavaScript numbers.
Implementations§
source§impl JsType
impl JsType
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 Ord for JsType
impl Ord for JsType
source§impl PartialOrd for JsType
impl PartialOrd for JsType
source§impl TryFrom<i32> for JsType
impl TryFrom<i32> for JsType
§type Error = UnknownEnumValue
type Error = UnknownEnumValue
The type returned in the event of a conversion error.
impl Copy for JsType
impl Eq for JsType
impl StructuralPartialEq for JsType
Auto Trait Implementations§
impl Freeze for JsType
impl RefUnwindSafe for JsType
impl Send for JsType
impl Sync for JsType
impl Unpin for JsType
impl UnwindSafe for JsType
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,
source§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)source§impl<T> CloneToUninit for Twhere
T: Copy,
impl<T> CloneToUninit for Twhere
T: Copy,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)