pub struct XmlData { /* private fields */ }
Expand description
A representation of XML data in TDS. Holds the data as a UTF-8 string and and optional information about the schema.
Implementations
sourceimpl XmlData
impl XmlData
sourcepub fn new(data: impl ToString) -> Self
pub fn new(data: impl ToString) -> Self
Create a new XmlData with the given string. Validation of the XML data happens in the database.
sourcepub fn schema(&self) -> Option<&XmlSchema>
pub fn schema(&self) -> Option<&XmlSchema>
Returns information about the schema of the XML file, if existing.
sourcepub fn into_string(self) -> String
pub fn into_string(self) -> String
Takes the XML string out from the struct.
Trait Implementations
sourceimpl<'a> FromSql<'a> for &'a XmlData
impl<'a> FromSql<'a> for &'a XmlData
sourcefn from_sql(value: &'a ColumnData<'static>) -> Result<Option<Self>>
fn from_sql(value: &'a ColumnData<'static>) -> Result<Option<Self>>
Returns the value, None
being a null value, copying the value.
sourceimpl FromSqlOwned for XmlData
impl FromSqlOwned for XmlData
sourcefn from_sql_owned(value: ColumnData<'static>) -> Result<Option<Self>>
fn from_sql_owned(value: ColumnData<'static>) -> Result<Option<Self>>
Returns the value, None
being a null value, taking the ownership.
sourceimpl<'a> IntoSql<'a> for &'a XmlData
impl<'a> IntoSql<'a> for &'a XmlData
sourcefn into_sql(self) -> ColumnData<'a>
fn into_sql(self) -> ColumnData<'a>
Convert to a value understood by the SQL Server. Conversion by-value.
sourceimpl<'a> IntoSql<'a> for XmlData
impl<'a> IntoSql<'a> for XmlData
sourcefn into_sql(self) -> ColumnData<'a>
fn into_sql(self) -> ColumnData<'a>
Convert to a value understood by the SQL Server. Conversion by-value.
sourceimpl ToSql for XmlData
impl ToSql for XmlData
sourcefn to_sql(&self) -> ColumnData<'_>
fn to_sql(&self) -> ColumnData<'_>
Convert to a value understood by the SQL Server. Conversion by-reference. Read more
impl StructuralPartialEq for XmlData
Auto Trait Implementations
impl RefUnwindSafe for XmlData
impl Send for XmlData
impl Sync for XmlData
impl Unpin for XmlData
impl UnwindSafe for XmlData
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> Instrument for T
impl<T> Instrument for T
sourcefn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
sourcefn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
sourceimpl<T> WithSubscriber for T
impl<T> WithSubscriber for T
sourcefn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
sourcefn with_current_subscriber(self) -> WithDispatch<Self>
fn with_current_subscriber(self) -> WithDispatch<Self>
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more