Struct reproto_core::RpField [] [src]

pub struct RpField<F: 'static> where
    F: Flavor
{ pub required: bool, pub safe_ident: Option<String>, pub ident: String, pub comment: Vec<String>, pub ty: F::Type, pub field_as: Option<String>, }

Fields

Is the field required.

Mangled identifier, taking target-specific keywords into account.

Original identifier used to specify the field.

Field comments.

Alias of field in JSON.

Methods

impl<F: 'static> RpField<F> where
    F: Flavor
[src]

[src]

[src]

[src]

[src]

Get the keyword-safe identifier.

This will be the identifier escaped to avoid any target-language keywords.

[src]

Change the safe identifier.

[src]

Get the original identifier of the field.

[src]

Get the JSON name of the field, if it differs from ident.

TODO: Return Option, currently returns ident. This is a better indication whether 'renaming' should occur.

[src]

Get the type of the field.

[src]

Trait Implementations

impl<F: Debug + 'static> Debug for RpField<F> where
    F: Flavor,
    F::Type: Debug
[src]

[src]

Formats the value using the given formatter. Read more

impl<F: Clone + 'static> Clone for RpField<F> where
    F: Flavor,
    F::Type: Clone
[src]

[src]

Returns a copy of the value. Read more

1.0.0
[src]

Performs copy-assignment from source. Read more

impl<F: PartialEq + 'static> PartialEq for RpField<F> where
    F: Flavor,
    F::Type: PartialEq
[src]

[src]

This method tests for self and other values to be equal, and is used by ==. Read more

[src]

This method tests for !=.

impl<F: Eq + 'static> Eq for RpField<F> where
    F: Flavor,
    F::Type: Eq
[src]

impl<F: 'static> FlavorField for RpField<F> where
    F: Flavor
[src]

[src]

Indicates if the field is discriminating in an untagged context.

impl<F: 'static, T> Translate<T> for RpField<F> where
    F: Flavor,
    T: Translator<Source = F>, 
[src]

[src]

Translate into different flavor.

Auto Trait Implementations

impl<F> Send for RpField<F> where
    <F as Flavor>::Type: Send

impl<F> Sync for RpField<F> where
    <F as Flavor>::Type: Sync