Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Graph should be visible #5

Closed
anon767 opened this issue May 21, 2022 · 7 comments
Closed

Graph should be visible #5

anon767 opened this issue May 21, 2022 · 7 comments
Assignees

Comments

@anon767
Copy link

anon767 commented May 21, 2022

The Graph enum and its fields should be visible.
For reasons where the printer interface does not satisfy more complex use-cases, e.g. interact with a graph database or such stuff

@besok
Copy link
Owner

besok commented May 22, 2022

I agree, that the visibility of the graph is vital for handling complex cases.
But at the moment the structures are public and you can easily obtain the access to the fields like that:

          let mut g = graph!(id!("id");;
          
          match g {
            Graph::Graph { id, strict, stmts } => {}
            Graph::DiGraph { id, strict, stmts } => {
                match stmts.get(0){
                    None => {}
                    Some(Stmt::Node(node)) => {}
                    Some(stm) => {}
                  }
              }
          }

Or do you mean another visibility?

@anon767
Copy link
Author

anon767 commented May 22, 2022

Hm correct me if I'm wrong, but shouldn't dot_structures be public here:
https://github.com/besok/graphviz-rust/blob/master/src/lib.rs#L81

pub use dot_structures::*;

Im not able to access it when using the crate :(

@besok
Copy link
Owner

besok commented May 22, 2022

well. Perhaps, it can be useful but honestly, you should have an access to the structures if I don't misunderstand it.
Have you had a look at the following repo? https://github.com/besok/test-graphviz-rust.git

@anon767
Copy link
Author

anon767 commented May 22, 2022

interesting. It works with graphviz-rust 0.1.2 but it does not work with graphviz-rust 0.2.0

@besok
Copy link
Owner

besok commented May 22, 2022

Indeed. I will give a look in the evening.

@besok besok self-assigned this May 22, 2022
@besok
Copy link
Owner

besok commented May 22, 2022

it turned out there were no references to the underling crates in the main crate so therefore I added them evidenly
It should work properly in the new version.

@anon767
Copy link
Author

anon767 commented May 23, 2022

perfect :) thanks

@anon767 anon767 closed this as completed May 23, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants