pub struct ProtobufImporter;Expand description
Parser for Protobuf format.
Implementations§
Source§impl ProtobufImporter
impl ProtobufImporter
Sourcepub fn new() -> ProtobufImporter
pub fn new() -> ProtobufImporter
Create a new Protobuf parser instance.
§Example
use data_modelling_core::import::protobuf::ProtobufImporter;
let importer = ProtobufImporter::new();Sourcepub fn import(&self, proto_content: &str) -> Result<ImportResult, ImportError>
pub fn import(&self, proto_content: &str) -> Result<ImportResult, ImportError>
Import Protobuf content and create Table(s) (SDK interface).
§Arguments
proto_content- Protobuf.protofile content as a string
§Returns
An ImportResult containing extracted tables and any parse errors.
§Example
use data_modelling_core::import::protobuf::ProtobufImporter;
let importer = ProtobufImporter::new();
let proto = r#"
syntax = "proto3";
message User {
int64 id = 1;
string name = 2;
}
"#;
let result = importer.import(proto).unwrap();Trait Implementations§
Source§impl Default for ProtobufImporter
impl Default for ProtobufImporter
Source§fn default() -> ProtobufImporter
fn default() -> ProtobufImporter
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for ProtobufImporter
impl RefUnwindSafe for ProtobufImporter
impl Send for ProtobufImporter
impl Sync for ProtobufImporter
impl Unpin for ProtobufImporter
impl UnwindSafe for ProtobufImporter
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more