mirror of https://github.com/kdl-org/kdl-rs.git
docs: Mention comments and whitespace in `format` accessors (#124)
This commit is contained in:
parent
c904e025a2
commit
c1680e8c04
|
|
@ -193,7 +193,7 @@ impl KdlDocument {
|
||||||
&mut self.nodes
|
&mut self.nodes
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Gets the formatting details for this entry.
|
/// Gets the formatting details (including whitespace and comments) for this entry.
|
||||||
pub fn format(&self) -> Option<&KdlDocumentFormat> {
|
pub fn format(&self) -> Option<&KdlDocumentFormat> {
|
||||||
self.format.as_ref()
|
self.format.as_ref()
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -112,7 +112,7 @@ impl KdlEntry {
|
||||||
self.ty = Some(ty.into());
|
self.ty = Some(ty.into());
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Gets the formatting details for this entry.
|
/// Gets the formatting details (including whitespace and comments) for this entry.
|
||||||
pub fn format(&self) -> Option<&KdlEntryFormat> {
|
pub fn format(&self) -> Option<&KdlEntryFormat> {
|
||||||
self.format.as_ref()
|
self.format.as_ref()
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -246,7 +246,7 @@ impl KdlNode {
|
||||||
self.children_mut().as_mut().unwrap()
|
self.children_mut().as_mut().unwrap()
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Gets the formatting details for this node.
|
/// Gets the formatting details (including whitespace and comments) for this node.
|
||||||
pub fn format(&self) -> Option<&KdlNodeFormat> {
|
pub fn format(&self) -> Option<&KdlNodeFormat> {
|
||||||
self.format.as_ref()
|
self.format.as_ref()
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue