You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@avro.apache.org by "Martin Tzvetanov Grigorov (Jira)" <ji...@apache.org> on 2023/05/09 18:23:00 UTC

[jira] [Resolved] (AVRO-3753) [Rust] Fix UnionSchema structure visibility

     [ https://issues.apache.org/jira/browse/AVRO-3753?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Martin Tzvetanov Grigorov resolved AVRO-3753.
---------------------------------------------
    Resolution: Not A Problem

[https://github.com/apache/avro/blob/master/lang/rust/avro/src/schema.rs#L681] has no `(crate)`. It is just `pub`.

> [Rust] Fix UnionSchema structure visibility
> -------------------------------------------
>
>                 Key: AVRO-3753
>                 URL: https://issues.apache.org/jira/browse/AVRO-3753
>             Project: Apache Avro
>          Issue Type: Improvement
>          Components: rust
>            Reporter: Fedor Telnov
>            Priority: Major
>
> If you look into `UnionSchema` struct, you'll find out that it both has `pub(crate)` constructor field(named "schemas") and `pub(crate)` constructor method("new"). Assuming this, it's clear that external user of your library is unable to build union by himself. The only thing external user can do is to parse unions from str.
> This serious limitation could be avoided by simply removing visibility modifiers(I think nothing serious would happen).



--
This message was sent by Atlassian Jira
(v8.20.10#820010)