-
Notifications
You must be signed in to change notification settings - Fork 31
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
SDK docs #172
SDK docs #172
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please also see my feedback from https://github.com/foxglove/foxglove-sdk-old/pull/65#pullrequestreview-2587986589 (looks like maybe some parts have been addressed already)
Yep! I was working off those comments. This is actually a WIP (and ought to be marked as such). I was just using this PR branch to hand off to @eloff. |
rust/foxglove/src/typed_channel.rs
Outdated
fn encoded_len(&self) -> Option<usize> { | ||
None | ||
} | ||
} | ||
|
||
impl<T: Serialize + JsonSchema> TypedMessage for T { | ||
/// Automatically implements [`Encode`] for any type that implements [`Serialize`] and [`JsonSchema`]. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Still not sure why rustdoc can't figure out the linkage on JsonSchema
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I couldn't figure it out either, just going to add links manually
rust/foxglove/src/lib.rs
Outdated
pub mod websocket; | ||
mod websocket_server; | ||
|
||
pub use channel::{Channel, Schema}; | ||
pub use channel_builder::ChannelBuilder; | ||
pub use encode::{Encode, TypedChannel}; | ||
#[doc(hidden)] | ||
pub use log_context::{GlobalContextTest, LogContext}; | ||
pub use log_sink::LogSink; | ||
pub use mcap_writer::{McapWriter, McapWriterHandle}; | ||
pub use metadata::{Metadata, PartialMetadata}; | ||
pub use time::nanoseconds_since_epoch; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we should remove time::nanoseconds_since_epoch
from the public API - not our core line of business.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Edit, I thought you were talking about GlobalContextTest. Yeah we can remove nanoseconds_since_epoch.
It's useful if they want to set timestamps themselves, but it's also not complicated for them to replicate.
Co-authored-by: Greg Smith <[email protected]>
… into gasmith/sdk-readme
Co-authored-by: Greg Smith <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I guess I can't approve this PR, since I opened it, but you've got my stamp of approval. We should get feedback from Bryan & Jacob as well.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Approved my own PR (ok, well Greg did sign off on it)
I made only small changes to existing wording, because it was well done. I added docs for types missing docs, hid types that are public for technical reasons, and renamed TypedMessage trait to Encode after discussing with Greg.
This doesn't fix the problem of having no readme. I'm not sure if we should repeat the crate docs, or just part of them, or put something else there.