Skip to content

Example of reading a fixed string #170

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

Closed
lukesneeringer opened this issue Sep 29, 2021 · 2 comments
Closed

Example of reading a fixed string #170

lukesneeringer opened this issue Sep 29, 2021 · 2 comments

Comments

@lukesneeringer
Copy link

I can not for the life of me figure out how to do this, and I have read a decent amount of the source code and tests.

I think it should be:

use hdf5;
use hdf5::types::FixedAscii;

#[derive(Clone, Debug, hdf5::H5Type, PartialEq)]
#[repr(C)]
struct Foo {
  bar: FixedAscii<10>,
}

This gives a compiler error: constant provided when a type was expected.

It would be really nice to have an example.

@lukesneeringer
Copy link
Author

I figured this out. It turns out the main branch has diverged significantly from the previous release, and my code is correct there.

It would be awesome if this could be released. :)

@mulimoen mulimoen mentioned this issue Oct 13, 2021
@aldanor aldanor mentioned this issue Oct 23, 2021
@aldanor
Copy link
Owner

aldanor commented Oct 23, 2021

Closed in #179

@aldanor aldanor closed this as completed Oct 23, 2021
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