#[repr(i32)]pub enum Visibility {
Unspecified = 0,
Skip = 1,
InputOnly = 2,
OutputOnly = 3,
}
Expand description
Change the visibility of a field or enum variant
Variants§
Unspecified = 0
Skip = 1
Skipped fields will not be deserialized or serialized.
InputOnly = 2
Fields marked as input only will only be deserialized and will not be serialized.
OutputOnly = 3
Fields marked as output only will not be deserialized and only will be serialized.
Implementations§
Source§impl Visibility
impl Visibility
Source§impl Visibility
impl Visibility
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 Visibility
impl Clone for Visibility
Source§fn clone(&self) -> Visibility
fn clone(&self) -> Visibility
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for Visibility
impl Debug for Visibility
Source§impl Default for Visibility
impl Default for Visibility
Source§fn default() -> Visibility
fn default() -> Visibility
Returns the “default value” for a type. Read more
Source§impl From<Visibility> for i32
impl From<Visibility> for i32
Source§fn from(value: Visibility) -> i32
fn from(value: Visibility) -> i32
Converts to this type from the input type.
Source§impl Hash for Visibility
impl Hash for Visibility
Source§impl Ord for Visibility
impl Ord for Visibility
Source§fn cmp(&self, other: &Visibility) -> Ordering
fn cmp(&self, other: &Visibility) -> Ordering
1.21.0 · 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 Visibility
impl PartialEq for Visibility
Source§impl PartialOrd for Visibility
impl PartialOrd for Visibility
Source§impl TryFrom<i32> for Visibility
impl TryFrom<i32> for Visibility
Source§type Error = UnknownEnumValue
type Error = UnknownEnumValue
The type returned in the event of a conversion error.
Source§fn try_from(value: i32) -> Result<Visibility, UnknownEnumValue>
fn try_from(value: i32) -> Result<Visibility, UnknownEnumValue>
Performs the conversion.
impl Copy for Visibility
impl Eq for Visibility
impl StructuralPartialEq for Visibility
Auto Trait Implementations§
impl Freeze for Visibility
impl RefUnwindSafe for Visibility
impl Send for Visibility
impl Sync for Visibility
impl Unpin for Visibility
impl UnwindSafe for Visibility
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