| 143 | } |
| 144 | |
| 145 | TSharedRef TYsonString::ToSharedRef() const |
| 146 | { |
| 147 | return Visit( |
| 148 | Payload_, |
| 149 | [] (const TNullPayload&) -> TSharedRef { |
| 150 | YT_ABORT(); |
| 151 | }, |
| 152 | [&] (const TSharedRangeHolderPtr& holder) { |
| 153 | return TSharedRef(Begin_, Size_, holder); |
| 154 | }, |
| 155 | [] (const TCowString& payload) { |
| 156 | return TSharedRef::FromString(payload); |
| 157 | }); |
| 158 | } |
| 159 | |
| 160 | size_t TYsonString::ComputeHash() const |
| 161 | { |
nothing calls this directly
no test coverage detected