pub struct FoamHeader { /* private fields */ }Expand description
The FoamFile { … } header block — an ordered flat keyword → raw-value map.
Values are stored verbatim (quotes preserved on the values that had them)
so that e.g. version 2.0; round-trips as 2.0 rather than being reparsed
to 2, and location "constant/polyMesh"; keeps its quotes.
Implementations§
Source§impl FoamHeader
impl FoamHeader
Sourcepub fn standard(class: &str, object: &str) -> Self
pub fn standard(class: &str, object: &str) -> Self
The standard header for a given class and object, with
version 2.0; format ascii;.
Sourcepub fn standard_with_location(class: &str, location: &str, object: &str) -> Self
pub fn standard_with_location(class: &str, location: &str, object: &str) -> Self
Like Self::standard but also records a location "…".
Sourcepub fn set(&mut self, keyword: &str, value: &str) -> &mut Self
pub fn set(&mut self, keyword: &str, value: &str) -> &mut Self
Set keyword → value (replacing in place if present, else appending).
Trait Implementations§
Source§impl Clone for FoamHeader
impl Clone for FoamHeader
Source§impl Debug for FoamHeader
impl Debug for FoamHeader
Source§impl Default for FoamHeader
impl Default for FoamHeader
Source§impl PartialEq for FoamHeader
impl PartialEq for FoamHeader
impl StructuralPartialEq for FoamHeader
Auto Trait Implementations§
impl Freeze for FoamHeader
impl RefUnwindSafe for FoamHeader
impl Send for FoamHeader
impl Sync for FoamHeader
impl Unpin for FoamHeader
impl UnsafeUnpin for FoamHeader
impl UnwindSafe for FoamHeader
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