pub struct GctfAttribute {
pub name: String,
pub value: String,
}Expand description
GCTF attribute (#[name(value)] syntax)
Fields§
§name: String§value: StringImplementations§
Source§impl GctfAttribute
impl GctfAttribute
pub fn new(name: impl Into<String>, value: impl Into<String>) -> GctfAttribute
pub fn flag(name: impl Into<String>) -> GctfAttribute
pub fn parse_u64(&self) -> Option<u64>
pub fn parse_u32(&self) -> Option<u32>
pub fn parse_f64(&self) -> Option<f64>
pub fn parse_bool(&self) -> Option<bool>
pub fn as_str(&self) -> &str
pub fn format_directive(&self) -> String
Trait Implementations§
Source§impl Clone for GctfAttribute
impl Clone for GctfAttribute
Source§fn clone(&self) -> GctfAttribute
fn clone(&self) -> GctfAttribute
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 moreSource§impl Debug for GctfAttribute
impl Debug for GctfAttribute
Source§impl<'de> Deserialize<'de> for GctfAttribute
impl<'de> Deserialize<'de> for GctfAttribute
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<GctfAttribute, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<GctfAttribute, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl PartialEq for GctfAttribute
impl PartialEq for GctfAttribute
Source§impl Serialize for GctfAttribute
impl Serialize for GctfAttribute
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
impl StructuralPartialEq for GctfAttribute
Auto Trait Implementations§
impl Freeze for GctfAttribute
impl RefUnwindSafe for GctfAttribute
impl Send for GctfAttribute
impl Sync for GctfAttribute
impl Unpin for GctfAttribute
impl UnsafeUnpin for GctfAttribute
impl UnwindSafe for GctfAttribute
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