MCPcopy Create free account
hub / github.com/AccessKit/accesskit / write_value

Method write_value

consumer/src/node.rs:828–838  ·  view source on GitHub ↗
(&self, mut writer: W)

Source from the content-addressed store, hash-verified

826 }
827
828 pub fn write_value<W: fmt::Write>(&self, mut writer: W) -> Result<bool, fmt::Error> {
829 if let Some(value) = &self.data().value() {
830 writer.write_str(value)?;
831 Ok(true)
832 } else if self.supports_text_ranges() && !self.is_multiline() {
833 self.document_range().write_text(writer)?;
834 Ok(true)
835 } else {
836 Ok(false)
837 }
838 }
839
840 pub fn has_value(&self) -> bool {
841 self.data().value().is_some() || (self.supports_text_ranges() && !self.is_multiline())

Callers 4

write_labelMethod · 0.80
valueMethod · 0.80
nameMethod · 0.80
valueMethod · 0.80

Calls 7

dataMethod · 0.80
is_multilineMethod · 0.80
write_textMethod · 0.80
document_rangeMethod · 0.80
valueMethod · 0.45
write_strMethod · 0.45
supports_text_rangesMethod · 0.45

Tested by

no test coverage detected