Struct ouroboros_examples::ouroboros_impl_documentation_example::DocumentationExample[][src]

pub struct DocumentationExample { /* fields omitted */ }

Implementations

Constructs a new instance of this self-referential struct. (See also DocumentationExampleBuilder::build()). Each argument is a field of the new struct. Fields that refer to other fields inside the struct are initialized using functions instead of directly passing their value. The arguments are as follows:

ArgumentSuggested Use
int_dataDirectly pass in the value this field should contain
float_dataDirectly pass in the value this field should contain
int_reference_builderUse a function or closure: (int_data: &_) -> int_reference: _
float_reference_builderUse a function or closure: (float_data: &mut _) -> float_reference: _

Constructs a new instance of this self-referential struct. (See also DocumentationExampleAsyncBuilder::build()). Each argument is a field of the new struct. Fields that refer to other fields inside the struct are initialized using functions instead of directly passing their value. The arguments are as follows:

ArgumentSuggested Use
int_dataDirectly pass in the value this field should contain
float_dataDirectly pass in the value this field should contain
int_reference_builderUse a function or closure: (int_data: &_) -> int_reference: _
float_reference_builderUse a function or closure: (float_data: &mut _) -> float_reference: _

(See also DocumentationExampleTryBuilder::try_build().) Like new, but builders for self-referencing fields can return results. If any of them fail, Err is returned. If all of them succeed, Ok is returned. The arguments are as follows:

ArgumentSuggested Use
int_dataDirectly pass in the value this field should contain
float_dataDirectly pass in the value this field should contain
int_reference_builderUse a function or closure: (int_data: &_) -> Result<int_reference: _, Error_>
float_reference_builderUse a function or closure: (float_data: &mut _) -> Result<float_reference: _, Error_>

(See also DocumentationExampleTryBuilder::try_build_or_recover().) Like try_new, but all head fields are returned in the case of an error. The arguments are as follows:

ArgumentSuggested Use
int_dataDirectly pass in the value this field should contain
float_dataDirectly pass in the value this field should contain
int_reference_builderUse a function or closure: (int_data: &_) -> Result<int_reference: _, Error_>
float_reference_builderUse a function or closure: (float_data: &mut _) -> Result<float_reference: _, Error_>

(See also DocumentationExampleAsyncTryBuilder::try_build().) Like new, but builders for self-referencing fields can return results. If any of them fail, Err is returned. If all of them succeed, Ok is returned. The arguments are as follows:

ArgumentSuggested Use
int_dataDirectly pass in the value this field should contain
float_dataDirectly pass in the value this field should contain
int_reference_builderUse a function or closure: (int_data: &_) -> Result<int_reference: _, Error_>
float_reference_builderUse a function or closure: (float_data: &mut _) -> Result<float_reference: _, Error_>

(See also DocumentationExampleAsyncTryBuilder::try_build_or_recover().) Like try_new, but all head fields are returned in the case of an error. The arguments are as follows:

ArgumentSuggested Use
int_dataDirectly pass in the value this field should contain
float_dataDirectly pass in the value this field should contain
int_reference_builderUse a function or closure: (int_data: &_) -> Result<int_reference: _, Error_>
float_reference_builderUse a function or closure: (float_data: &mut _) -> Result<float_reference: _, Error_>

Provides limited immutable access to int_data. This method was generated because the contents of int_data are immutably borrowed by other fields.

Provides limited immutable access to int_data. This method was generated because the contents of int_data are immutably borrowed by other fields.

Provides an immutable reference to int_reference. This method was generated because int_reference is a tail field.

Provides an immutable reference to int_reference. This method was generated because int_reference is a tail field.

Provides a mutable reference to int_reference. This method was generated because int_reference is a tail field. No borrow_int_reference_mut function was generated because Rust’s borrow checker is currently unable to guarantee that such a method would be used safely.

Provides an immutable reference to float_reference. This method was generated because float_reference is a tail field.

Provides an immutable reference to float_reference. This method was generated because float_reference is a tail field.

Provides a mutable reference to float_reference. This method was generated because float_reference is a tail field. No borrow_float_reference_mut function was generated because Rust’s borrow checker is currently unable to guarantee that such a method would be used safely.

This method provides immutable references to all tail and immutably borrowed fields.

This method provides mutable references to all tail fields.

This function drops all internally referencing fields and returns only the head fields of this struct.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.