Omit to_writer and Serializer in no_std mode

These rely on the caller to pass in a Write impl; the impls provided in
serde_json are only for Vec<u8> and I don't want to be in the business
of copying many more Write impls from std into serde_json.
This commit is contained in:
David Tolnay 2020-01-22 12:21:55 -08:00
parent 0de7b516f5
commit ab4ca99fcb
No known key found for this signature in database
GPG Key ID: F9BA143B95FF6D82

View File

@ -409,9 +409,10 @@ pub use self::de::{from_slice, from_str, Deserializer, StreamDeserializer};
#[doc(inline)]
pub use self::error::{Error, Result};
#[doc(inline)]
pub use self::ser::{
to_string, to_string_pretty, to_vec, to_vec_pretty, to_writer, to_writer_pretty, Serializer,
};
pub use self::ser::{to_string, to_string_pretty, to_vec, to_vec_pretty};
#[cfg(feature = "std")]
#[doc(inline)]
pub use self::ser::{to_writer, to_writer_pretty, Serializer};
#[doc(inline)]
pub use self::value::{from_value, to_value, Map, Number, Value};
@ -432,7 +433,10 @@ mod macros;
pub mod de;
pub mod error;
pub mod map;
#[cfg(feature = "std")]
pub mod ser;
#[cfg(not(feature = "std"))]
mod ser;
pub mod value;
mod features_check;