Implement bounded Binary LLSD codec
This commit is contained in:
@@ -251,9 +251,7 @@ impl OSDParser {
|
||||
stream: Box<dyn libremetaverse_types::compat::ReadWrite + Send>,
|
||||
consume_bytes: i32,
|
||||
) -> Result<Vec<u8>, crate::Error> {
|
||||
libremetaverse_types::not_implemented(
|
||||
"M:LibreMetaverse.StructuredData.OSDParser.ConsumeBytes(System.IO.Stream,System.Int32)",
|
||||
)
|
||||
crate::binary::consume_bytes(stream, consume_bytes)
|
||||
}
|
||||
/// C# member: `M:LibreMetaverse.StructuredData.OSDParser.Deserialize(System.Byte[])`.
|
||||
pub fn deserialize_with_bytes(
|
||||
@@ -293,17 +291,13 @@ impl OSDParser {
|
||||
pub fn deserialize_llsd_binary_with_bytes(
|
||||
binary_data: Vec<u8>,
|
||||
) -> Result<libremetaverse_structured_data::OSD, crate::Error> {
|
||||
libremetaverse_types::not_implemented(
|
||||
"M:LibreMetaverse.StructuredData.OSDParser.DeserializeLLSDBinary(System.Byte[])",
|
||||
)
|
||||
crate::binary::deserialize_bytes(binary_data)
|
||||
}
|
||||
/// C# member: `M:LibreMetaverse.StructuredData.OSDParser.DeserializeLLSDBinary(System.IO.Stream)`.
|
||||
pub fn deserialize_llsd_binary_with_stream(
|
||||
stream: Box<dyn libremetaverse_types::compat::ReadWrite + Send>,
|
||||
) -> Result<libremetaverse_structured_data::OSD, crate::Error> {
|
||||
libremetaverse_types::not_implemented(
|
||||
"M:LibreMetaverse.StructuredData.OSDParser.DeserializeLLSDBinary(System.IO.Stream)",
|
||||
)
|
||||
crate::binary::deserialize_stream(stream)
|
||||
}
|
||||
/// C# member: `M:LibreMetaverse.StructuredData.OSDParser.DeserializeLLSDNotation(System.IO.StringReader)`.
|
||||
pub fn deserialize_llsd_notation_with_string_reader(
|
||||
@@ -383,18 +377,14 @@ impl OSDParser {
|
||||
stream: Box<dyn libremetaverse_types::compat::ReadWrite + Send>,
|
||||
to_find: u8,
|
||||
) -> Result<bool, crate::Error> {
|
||||
libremetaverse_types::not_implemented(
|
||||
"M:LibreMetaverse.StructuredData.OSDParser.FindByte(System.IO.Stream,System.Byte)",
|
||||
)
|
||||
crate::binary::find_byte(stream, to_find)
|
||||
}
|
||||
/// C# member: `M:LibreMetaverse.StructuredData.OSDParser.FindString(System.IO.Stream,System.String)`.
|
||||
pub fn find_string(
|
||||
stream: Box<dyn libremetaverse_types::compat::ReadWrite + Send>,
|
||||
to_find: String,
|
||||
) -> Result<bool, crate::Error> {
|
||||
libremetaverse_types::not_implemented(
|
||||
"M:LibreMetaverse.StructuredData.OSDParser.FindString(System.IO.Stream,System.String)",
|
||||
)
|
||||
crate::binary::find_string(stream, to_find)
|
||||
}
|
||||
/// C# member: `M:LibreMetaverse.StructuredData.OSDParser.GetLengthInBrackets(System.IO.StringReader)`.
|
||||
pub fn get_length_in_brackets(
|
||||
@@ -415,21 +405,15 @@ impl OSDParser {
|
||||
}
|
||||
/// C# member: `M:LibreMetaverse.StructuredData.OSDParser.HostToNetworkIntBytes(System.Int32)`.
|
||||
pub fn host_to_network_int_bytes(int_host_end: i32) -> Result<Vec<u8>, crate::Error> {
|
||||
libremetaverse_types::not_implemented(
|
||||
"M:LibreMetaverse.StructuredData.OSDParser.HostToNetworkIntBytes(System.Int32)",
|
||||
)
|
||||
crate::binary::host_to_network_int_bytes(int_host_end)
|
||||
}
|
||||
/// C# member: `M:LibreMetaverse.StructuredData.OSDParser.NetworkToHostDouble(System.Byte[])`.
|
||||
pub fn network_to_host_double(binary_net_end: Vec<u8>) -> Result<f64, crate::Error> {
|
||||
libremetaverse_types::not_implemented(
|
||||
"M:LibreMetaverse.StructuredData.OSDParser.NetworkToHostDouble(System.Byte[])",
|
||||
)
|
||||
crate::binary::network_to_host_double(binary_net_end)
|
||||
}
|
||||
/// C# member: `M:LibreMetaverse.StructuredData.OSDParser.NetworkToHostInt(System.Byte[])`.
|
||||
pub fn network_to_host_int(binary_net_end: Vec<u8>) -> Result<i32, crate::Error> {
|
||||
libremetaverse_types::not_implemented(
|
||||
"M:LibreMetaverse.StructuredData.OSDParser.NetworkToHostInt(System.Byte[])",
|
||||
)
|
||||
crate::binary::network_to_host_int(binary_net_end)
|
||||
}
|
||||
/// C# member: `M:LibreMetaverse.StructuredData.OSDParser.PeekAndSkipWhitespace(System.IO.StringReader)`.
|
||||
pub fn peek_and_skip_whitespace(
|
||||
@@ -460,35 +444,27 @@ impl OSDParser {
|
||||
pub fn serialize_llsd_binary_with_osd(
|
||||
osd: libremetaverse_structured_data::OSD,
|
||||
) -> Result<Vec<u8>, crate::Error> {
|
||||
libremetaverse_types::not_implemented(
|
||||
"M:LibreMetaverse.StructuredData.OSDParser.SerializeLLSDBinary(LibreMetaverse.StructuredData.OSD)",
|
||||
)
|
||||
crate::binary::serialize(osd)
|
||||
}
|
||||
/// C# member: `M:LibreMetaverse.StructuredData.OSDParser.SerializeLLSDBinary(LibreMetaverse.StructuredData.OSD,System.Boolean)`.
|
||||
pub fn serialize_llsd_binary_with_osd_boolean(
|
||||
osd: libremetaverse_structured_data::OSD,
|
||||
prepend_header: bool,
|
||||
) -> Result<Vec<u8>, crate::Error> {
|
||||
libremetaverse_types::not_implemented(
|
||||
"M:LibreMetaverse.StructuredData.OSDParser.SerializeLLSDBinary(LibreMetaverse.StructuredData.OSD,System.Boolean)",
|
||||
)
|
||||
crate::binary::serialize_with_header(osd, prepend_header)
|
||||
}
|
||||
/// C# member: `M:LibreMetaverse.StructuredData.OSDParser.SerializeLLSDBinaryStream(LibreMetaverse.StructuredData.OSD)`.
|
||||
pub fn serialize_llsd_binary_stream_with_osd(
|
||||
data: libremetaverse_structured_data::OSD,
|
||||
) -> Result<std::io::Cursor<Vec<u8>>, crate::Error> {
|
||||
libremetaverse_types::not_implemented(
|
||||
"M:LibreMetaverse.StructuredData.OSDParser.SerializeLLSDBinaryStream(LibreMetaverse.StructuredData.OSD)",
|
||||
)
|
||||
crate::binary::serialize_stream(data)
|
||||
}
|
||||
/// C# member: `M:LibreMetaverse.StructuredData.OSDParser.SerializeLLSDBinaryStream(LibreMetaverse.StructuredData.OSD,System.Boolean)`.
|
||||
pub fn serialize_llsd_binary_stream_with_osd_boolean(
|
||||
data: libremetaverse_structured_data::OSD,
|
||||
prepend_header: bool,
|
||||
) -> Result<std::io::Cursor<Vec<u8>>, crate::Error> {
|
||||
libremetaverse_types::not_implemented(
|
||||
"M:LibreMetaverse.StructuredData.OSDParser.SerializeLLSDBinaryStream(LibreMetaverse.StructuredData.OSD,System.Boolean)",
|
||||
)
|
||||
crate::binary::serialize_stream_with_header(data, prepend_header)
|
||||
}
|
||||
/// C# member: `M:LibreMetaverse.StructuredData.OSDParser.SerializeLLSDInnerXmlString(LibreMetaverse.StructuredData.OSD)`.
|
||||
pub fn serialize_llsd_inner_xml_string(
|
||||
@@ -568,9 +544,7 @@ impl OSDParser {
|
||||
pub fn skip_white_space(
|
||||
stream: Box<dyn libremetaverse_types::compat::ReadWrite + Send>,
|
||||
) -> Result<(), crate::Error> {
|
||||
libremetaverse_types::not_implemented(
|
||||
"M:LibreMetaverse.StructuredData.OSDParser.SkipWhiteSpace(System.IO.Stream)",
|
||||
)
|
||||
crate::binary::skip_whitespace(stream)
|
||||
}
|
||||
/// C# member: `M:LibreMetaverse.StructuredData.OSDParser.UnescapeCharacter(System.String,System.Char)`.
|
||||
pub fn unescape_character(
|
||||
|
||||
Reference in New Issue
Block a user