Skip to main content

hara_native/lang/protocol/
istringlike.rs

1use hara_protocol_macros::hara_protocol;
2
3#[hara_protocol(
4    namespace = "std.protocol.istringlike",
5    name = "IStringLike",
6    availability = "capability-gated",
7    capability = "native-runtime-protocols"
8)]
9pub trait IStringLike {
10    type Output;
11
12    #[hara_method(value = "to-string", arity = 1)]
13    fn to_string_value(&self) -> Self::Output;
14    #[hara_method(value = "from-string", arity = 2)]
15    fn from_string(&self, value: &str) -> Self::Output;
16}