OxL Reference

method Schema.of

A schema with this protobuf type text, for the schema() function of a Codec.

Example:

oxl✓ checked in CI
use std.ser { Schema }

fn main() io {
  print(Schema.of("sint64").proto)
}
Output
sint64
pub(api) static fn of(proto: str) -> Schema

Complexity. O(1).

Since. 1.0.0-beta

Parameters

NameType
protostr

Returns

Schema

Effects

none declared (pure unless the body says otherwise)

Defined in: std/ser/ser.oxl:131

See also